Release lerna packages #3
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 lerna packages | |
on: | |
workflow_dispatch: | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
# ======================================================================================================================== | |
# | |
# GitHub does not provide a native way for us to enforce workflow permissions, so we have our own solution to only | |
# allow usernames listed in the array within the `if` below to ensure only certain users can publish the packages to npm. | |
# | |
# ======================================================================================================================== | |
- if: ${{ github.event.pull_request.merged != true && contains('["JamesHenry", "vsavkin"]', github.actor) != true }} | |
name: Ensure current actor is allowed to run the workflow | |
run: | | |
echo "Error: Your GitHub username (${{ github.actor }}) is not on the allowed list of admins for this workflow" | |
exit 1 | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install primary node version (see volta config in package.json) and dependencies | |
uses: ./.github/actions/install-node-and-dependencies | |
- run: npm run lerna-release -- --local=false --tag=latest --noInteractive | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} |