Merge branch 'main' into alpha #346
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: | |
- main | |
- alpha | |
- beta | |
jobs: | |
release: | |
if: github.repository == 'bnb-chain/greenfield-js-sdk' | |
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 "@bnb-chain/**" 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' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |