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: release-please | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
token: ${{ secrets.NODE_CLI }} | |
command: manifest | |
monorepo-tags: true | |
- name: Checkout Repository | |
if: ${{ steps.release.outputs.releases_created }} | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
if: ${{ steps.release.outputs.releases_created }} | |
with: | |
node-version: 20.x | |
registry-url: "https://registry.npmjs.org" | |
# Release Please has already incremented versions and published tags, so we just | |
# need to publish all unpublished versions to NPM here | |
# See: https://github.com/lerna/lerna/tree/main/libs/commands/publish#readme | |
publish-npm: | |
needs: release-please | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org/ | |
- run: npx lerna publish from-package --no-push --no-private --yes --loglevel debug | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} |