Revert "Merge pull request #338 from wasmerio/release-v2.0.0" #6
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
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
name: Run Release Please | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install release-please | |
run: npm install --global [email protected] | |
- name: Update the Release PR | |
run: | | |
release-please release-pr \ | |
--debug \ | |
--token=${{ secrets.RELEASE_PLEASE_GH_TOKEN }} \ | |
--repo-url=${{ github.repositoryUrl }} \ | |
--config-file=.github/release-please/config.json \ | |
--manifest-file=.github/release-please/manifest.json | |
- name: Publish the GitHub Release | |
run: | | |
release-please github-release \ | |
--debug \ | |
--token=${{ secrets.RELEASE_PLEASE_GH_TOKEN }} \ | |
--repo-url=${{ github.repositoryUrl }} \ | |
--config-file=.github/release-please/config.json \ | |
--manifest-file=.github/release-please/manifest.json | |
publish-to-npm: | |
runs-on: ubuntu-latest | |
needs: [ | |
"release-please" | |
] | |
if: startsWith(github.ref, 'refs/tags/wasmer-sdk-') | |
steps: | |
# The logic below handles the npm publication: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Setup Rust | |
uses: dsherret/rust-toolchain-file@v1 | |
- name: Install wasm-pack | |
uses: taiki-e/install-action@wasm-pack | |
- name: Install wasm-strip and wasm-opt | |
run: sudo apt-get update && sudo apt-get install -y wabt binaryen | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install JS Dependencies | |
run: npm ci | |
- name: Build Packages | |
run: npm run build | |
# Release Please has already incremented versions and published tags, so | |
# we just need to publish to NPM | |
- name: Publish to NPM | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |