Skip to content

Fix publish issues and reconfigure master for development #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish
on:
schedule:
- cron: '40 3 * * *'
- cron: '0 0 * * *'
jobs:
publish:
name: "Publish packages"
Expand Down Expand Up @@ -30,6 +30,8 @@ jobs:
npm run build
- name: Test distribution files
run: npm test
- name: Reconfigure for release
run: npm run release
- name: Set up version
run: |
VERSION=$(node -e "console.log(require('./package.json').version)")
Expand All @@ -50,7 +52,7 @@ jobs:
git commit --allow-empty -m "Release v$VERSION"
fi
echo ::set-env name=VERSION::$VERSION
cd ./lib/loader
cd lib/loader
npm version $VERSION --no-git-tag-version --force
cd ../..
- name: Create tag and push distribution files
Expand All @@ -59,17 +61,24 @@ jobs:
git push origin release
git push origin v$VERSION
- name: Publish to npm
env:
NPM_REGISTRY: "registry.npmjs.org"
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm config set "//${NPM_REGISTRY}/:_authToken=${NPM_AUTH_TOKEN}"
npm publish --tag $CHANNEL
cd ./lib/loader
cd lib/loader
npm publish --tag $CHANNEL --access public
cd ../..
- name: Publish to gpr
env:
NPM_REGISTRY: "npm.pkg.github.com"
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
npm config set "//${NPM_REGISTRY}/:_authToken=${NPM_AUTH_TOKEN}""
sed -i 's/"assemblyscript"/"@assemblyscript\/assemblyscript"/' package.json
npm publish --tag $CHANNEL --access public
cd ./lib/loader
npm publish --tag $CHANNEL --access public
sed -i 's/"assemblyscript"/"@assemblyscript\/assemblyscript"/' package-lock.json
npm publish --registry=https://${NPM_REGISTRY}
cd lib/loader
npm publish --registry=https://${NPM_REGISTRY}
cd ../..
55 changes: 11 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![](https://avatars1.githubusercontent.com/u/28916798?s=64) AssemblyScript
=================

[![Actions Status](https://github.com/AssemblyScript/assemblyscript/workflows/CI/badge.svg)](https://github.com/AssemblyScript/assemblyscript/actions)
[![Actions Status](https://github.com/AssemblyScript/assemblyscript/workflows/CI/badge.svg)](https://github.com/AssemblyScript/assemblyscript/actions) [![npm](https://img.shields.io/npm/v/assemblyscript.svg?color=0074C1)](https://www.npmjs.com/package/assemblyscript) [![npm (tag)](https://img.shields.io/npm/v/assemblyscript/nightly.svg?color=0074C1)](https://www.npmjs.com/package/assemblyscript)

**AssemblyScript** compiles a strict subset of [TypeScript](http://www.typescriptlang.org) (basically JavaScript with types) to [WebAssembly](http://webassembly.org) using [Binaryen](https://github.com/WebAssembly/binaryen). It generates lean and mean WebAssembly modules while being just an `npm install` away.

Expand Down Expand Up @@ -45,50 +45,17 @@ Motivation

> I do think [compiling TypeScript into WASM] is tremendously useful. It allows JavaScript developers to create WASM modules without having to learn C. – Colin Eberhardt, [Exploring different approaches to building WebAssembly modules](http://blog.scottlogic.com/2017/10/17/wasm-mandelbrot.html) (Oct 17, 2017)

Instructions
------------
Further resources
-----------------

For general usage instructions, please refer to the [documentation](https://docs.assemblyscript.org) instead. The following sets up a *development environment* of the compiler, for example if you plan to make a pull request:
* [Documentation](https://docs.assemblyscript.org)<br />
Introduction, quick start, examples and general usage instructions.

```
$> git clone https://github.com/AssemblyScript/assemblyscript.git
$> cd assemblyscript
$> npm install
$> npm link
$> npm run clean
```
* [Development instructions](https://docs.assemblyscript.org/details/development)<br />
How to set up a development environment (to submit a pull request).

Note that a fresh clone of the compiler will use the distribution files in `dist/`, but after an `npm run clean` it will run [the sources](./src) directly through ts-node, which is useful in development. This condition can also be checked by running `asc -v` (it is running the sources if it states `-dev`). Also please see our [contribution guidelines](./CONTRIBUTING.md) before making your first pull request.
* [Project governance](https://github.com/AssemblyScript/meta)<br />
Meta information related to the AssemblyScript project.

Building
--------

To build an UMD bundle to `dist/assemblyscript.js` (depends on [binaryen.js](https://github.com/AssemblyScript/binaryen.js)), including a browser version of asc to `dist/asc.js` (depends on assemblyscript.js):

```
$> npm run build
```

Cleaning the distribution files (again):

```
$> npm run clean
```

Linting potential changes:

```
$> npm run check
```

Running the [tests](./tests):

```
$> npm test
```

Running everything in order (lint, clean, test, build, test):

```
$> npm run all
```
* [Media files](./media)<br />
Various media files, like logos etc.
2 changes: 0 additions & 2 deletions dist/asc.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/asc.js.map

This file was deleted.

Loading