Update release.yaml (#6) #4
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: Release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- alpha | ||
- beta | ||
jobs: | ||
release: | ||
if: github.repository == 'node-real/web3.js-plugin-bundle' | ||
name: release | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
issues: write # to post issue comments (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- uses: ./.github/actions/ci-setup | ||
- name: Build | ||
run: pnpm -F "@node-real/**" build | ||
- name: Creating .npmrc | ||
run: | | ||
cat << EOF > "$HOME/.npmrc" | ||
//registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
EOF | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Create Release Pull Request or Publish to npm | ||
uses: changesets/action@v1 | ||
with: | ||
# Note: pnpm install after versioning is necessary to refresh lockfile | ||
version: pnpm run version | ||
publish: pnpm exec changeset publish | ||
commit: 'chore: [ci] release' | ||
title: 'chore: [ci] release' | ||
secrets: inherit | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |