release #25
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: workflow_dispatch | |
jobs: | |
publish: | |
name: Create release and publish to NPM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
token: ${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Ensure access to NPM registry | |
run: npm whoami | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Config git user | |
run: | | |
git config --global user.name "n9-machine-user" | |
git config --global user.email "[email protected]" | |
git remote set-url origin https://n9-machine-user:${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
- name: Bump versions and publish packages | |
run: | | |
yarn install | |
yarn ci | |
npx lerna version --yes --force-publish --conventional-commits --conventional-graduate --include-merged-tags --create-release github | |
npx lerna publish --yes from-package | |
env: | |
GH_TOKEN: ${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |