pkgname:wasm-git-browser #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
default: | |
name: "Default" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Default | |
run: | | |
sh setup.sh | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
cd .. | |
source ./emsdk/emsdk_env.sh | |
cd emscriptenbuild | |
./build.sh Release-async | |
cd .. | |
set -e | |
export VERSION=`npm view wasm-git-browser dist-tags.latest` | |
export NEWVERSION=`node -p "require('./package.json').version"` | |
echo $VERSION $NEWVERSION | |
./preparepublishnpm.sh | |
PACKAGEFILE=`npm pack | tail -n 1` | |
tar -xvzf $PACKAGEFILE | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |