Skip to content

Commit 1503f4d

Browse files
authored
Fix publish issues and reconfigure master for development (#944)
1 parent 0b9a80a commit 1503f4d

File tree

12 files changed

+74
-5321
lines changed

12 files changed

+74
-5321
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish
22
on:
33
schedule:
4-
- cron: '40 3 * * *'
4+
- cron: '0 0 * * *'
55
jobs:
66
publish:
77
name: "Publish packages"
@@ -30,6 +30,8 @@ jobs:
3030
npm run build
3131
- name: Test distribution files
3232
run: npm test
33+
- name: Reconfigure for release
34+
run: npm run release
3335
- name: Set up version
3436
run: |
3537
VERSION=$(node -e "console.log(require('./package.json').version)")
@@ -50,7 +52,7 @@ jobs:
5052
git commit --allow-empty -m "Release v$VERSION"
5153
fi
5254
echo ::set-env name=VERSION::$VERSION
53-
cd ./lib/loader
55+
cd lib/loader
5456
npm version $VERSION --no-git-tag-version --force
5557
cd ../..
5658
- name: Create tag and push distribution files
@@ -59,17 +61,24 @@ jobs:
5961
git push origin release
6062
git push origin v$VERSION
6163
- name: Publish to npm
64+
env:
65+
NPM_REGISTRY: "registry.npmjs.org"
66+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6267
run: |
63-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
68+
npm config set "//${NPM_REGISTRY}/:_authToken=${NPM_AUTH_TOKEN}"
6469
npm publish --tag $CHANNEL
65-
cd ./lib/loader
70+
cd lib/loader
6671
npm publish --tag $CHANNEL --access public
6772
cd ../..
6873
- name: Publish to gpr
74+
env:
75+
NPM_REGISTRY: "npm.pkg.github.com"
76+
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6977
run: |
70-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
78+
npm config set "//${NPM_REGISTRY}/:_authToken=${NPM_AUTH_TOKEN}""
7179
sed -i 's/"assemblyscript"/"@assemblyscript\/assemblyscript"/' package.json
72-
npm publish --tag $CHANNEL --access public
73-
cd ./lib/loader
74-
npm publish --tag $CHANNEL --access public
80+
sed -i 's/"assemblyscript"/"@assemblyscript\/assemblyscript"/' package-lock.json
81+
npm publish --registry=https://${NPM_REGISTRY}
82+
cd lib/loader
83+
npm publish --registry=https://${NPM_REGISTRY}
7584
cd ../..

README.md

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![](https://avatars1.githubusercontent.com/u/28916798?s=64) AssemblyScript
22
=================
33

4-
[![Actions Status](https://github.com/AssemblyScript/assemblyscript/workflows/CI/badge.svg)](https://github.com/AssemblyScript/assemblyscript/actions)
4+
[![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)
55

66
**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.
77

@@ -45,50 +45,17 @@ Motivation
4545
4646
> 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)
4747
48-
Instructions
49-
------------
48+
Further resources
49+
-----------------
5050

51-
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:
51+
* [Documentation](https://docs.assemblyscript.org)<br />
52+
Introduction, quick start, examples and general usage instructions.
5253

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

61-
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.
57+
* [Project governance](https://github.com/AssemblyScript/meta)<br />
58+
Meta information related to the AssemblyScript project.
6259

63-
Building
64-
--------
65-
66-
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):
67-
68-
```
69-
$> npm run build
70-
```
71-
72-
Cleaning the distribution files (again):
73-
74-
```
75-
$> npm run clean
76-
```
77-
78-
Linting potential changes:
79-
80-
```
81-
$> npm run check
82-
```
83-
84-
Running the [tests](./tests):
85-
86-
```
87-
$> npm test
88-
```
89-
90-
Running everything in order (lint, clean, test, build, test):
91-
92-
```
93-
$> npm run all
94-
```
60+
* [Media files](./media)<br />
61+
Various media files, like logos etc.

dist/asc.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/asc.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)