Skip to content

Publish

Publish #575

Workflow file for this run

name: Publish
on:
schedule:
- cron: '0 0 * * *'
jobs:
release:
name: Packages
if: github.repository == 'AssemblyScript/wasi-shim'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
- uses: actions/setup-node@v3
with:
node-version: latest
- name: Install dependencies
run: npm install
- name: Build packages
run: |
VERSION=$(npx aspublish --version)
if [[ "$VERSION" == "" ]]; then
echo "Changes do not trigger a release"
elif [[ "$VERSION" != "0."* ]]; then
echo "Unexpected version: $VERSION"
exit 1
else
echo "Building version: $VERSION"
npm version "$VERSION" --no-git-tag-version
npm test
fi
- name: Publish packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ $(node -pe "require('./package.json').version") != "0.0.0" ]; then
npx aspublish
fi