2022-05-05 20:56:08 +02:00
|
|
|
name: Publish Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'yarn'
|
|
|
|
- run: |
|
|
|
|
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz | tar xvz -C /tmp
|
|
|
|
sudo mv /tmp/wabt-1.0.27/bin/* /usr/local/bin
|
|
|
|
- run: yarnpkg --pure-lockfile
|
|
|
|
- run: yarnpkg build
|
|
|
|
- run: yarnpkg lint
|
|
|
|
- run: yarnpkg test --coverage
|
|
|
|
|
|
|
|
publish-npm:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'yarn'
|
|
|
|
- run: |
|
|
|
|
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz | tar xvz -C /tmp
|
|
|
|
sudo mv /tmp/wabt-1.0.27/bin/* /usr/local/bin
|
|
|
|
- run: yarnpkg --pure-lockfile
|
|
|
|
- run: yarnpkg publish --non-interactive
|
|
|
|
env:
|
2022-05-06 19:48:04 +02:00
|
|
|
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
|
|
|
|
|
|
publish-site:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'yarn'
|
|
|
|
- run: sudo apt-get install awscli
|
|
|
|
- run: |
|
|
|
|
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz | tar xvz -C /tmp
|
|
|
|
sudo mv /tmp/wabt-1.0.27/bin/* /usr/local/bin
|
|
|
|
- run: yarnpkg --pure-lockfile
|
|
|
|
- run: yarnpkg build
|
|
|
|
- name: aws s3 sync
|
|
|
|
run: |
|
|
|
|
aws configure set region eu-central-1
|
|
|
|
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}}
|
|
|
|
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
|
|
|
aws s3 sync public/waforth/ s3://${{secrets.AWS_SITE_BUCKET}}/waforth/
|