fix(project): npm/git release mechanism #6
Workflow file for this run
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: Version and Release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*.*.*' | |
jobs: | |
versioning: | |
name: Versioning and Publishing to NPM | |
environment: packages-releasing | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm install | |
- name: Build packages | |
run: npx nx affected --targets build --exclude vctrl/official-website,official-website-e2e | |
- name: Setup Git | |
run: | | |
git config --global user.email "<>" | |
git config --global user.name "github-actions[bot]" | |
- name: Print Environment Info | |
run: npx nx report | |
shell: bash | |
- name: Publish packages | |
run: npx nx release publish | |
shell: bash | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true |