chore: update CI dependencies in .github/workflows/main.yaml #501
This file contains hidden or 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 npm packages and apps | |
| on: | |
| release: | |
| types: | |
| - released | |
| push: | |
| jobs: | |
| release-npm: | |
| name: Release npm packages | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: latest | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Lerna Bump Version on release | |
| run: pnpm lerna version ${{ github.event.release.tag_name }} --no-git-tag-version --no-push --yes | |
| if: github.event_name == 'release' | |
| - name: Lerna Bump Version on push | |
| run: pnpm lerna version 1.0.0-next --no-git-tag-version --no-push --yes | |
| if: github.event_name == 'push' | |
| - name: Build packages | |
| run: | | |
| pnpm build --filter=rxbot-cli | |
| pnpm install --no-frozen-lockfile # Reinstall to update binaries | |
| pnpm build --filter=!rxbot-cli | |
| - name: Add and commit version changed | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| message: "Release ${{ steps.version.outputs.new_release_version }}" | |
| push: false | |
| - name: Sign In to NPM | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| npm whoami | |
| - name: Lerna Publish | |
| run: pnpm lerna publish from-package --yes | |
| # if the event is a release, we need to publish the packages | |
| if: github.event_name == 'release' | |
| - name: Lerna Publish dry | |
| run: pnpm publish:dry | |
| # if the event is a push to main, we need to publish the packages | |
| if: github.event_name == 'push' |