Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [ ci ]
branches: [master]
types:
- completed
jobs:
maybe-release:
name: release
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
# you should probably do this after your regular CI checks passes
- uses: google-github-actions/release-please-action@v3 # it will analyze commits and create PR with new version and updated CHANGELOG:md file. On merging it will create github release page with changelog
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: master
release-type: node
monorepo-tags: true
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'
- uses: actions/checkout@v3
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.releases_created }}
- uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.releases_created }}
- run: yarn install --immutable
if: ${{ steps.release.outputs.releases_created }}
- run: yarn build
if: ${{ steps.release.outputs.releases_created }}
- env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.releases_created }}
run: |
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
- run: yarn workspaces foreach -v --exclude root --no-private npm publish --tolerate-republish --access public
if: ${{ steps.release.outputs.releases_created }}