Publish Packages to npmjs #12
Workflow file for this run
This file contains hidden or 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: Publish Packages to npmjs | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: building infra | |
run: | | |
cd packages/infra | |
npm install | |
VERSION="${GITHUB_REF_NAME#v}" | |
npm version "$VERSION" | |
npm run build | |
npm publish --access public | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: building management | |
run: | | |
cd packages/management | |
npm install | |
VERSION="${GITHUB_REF_NAME#v}" | |
npm version "$VERSION" | |
npm run build | |
npm publish --access public | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |