Skip to content

release

release #19

Workflow file for this run

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
npx lerna version --yes --conventional-commits --create-release github
npx lerna publish --yes from-package
env:
GH_TOKEN: ${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}