Skip to content

Commit

Permalink
fix(project): npm/git release mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlomoh committed Aug 28, 2024
1 parent 82fcb1c commit 8f64cd0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ on:
push:
branches:
- main
paths:
- 'packages/**'
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
Expand All @@ -37,8 +40,14 @@ jobs:
git config --global user.email "<>"
git config --global user.name "github-actions[bot]"
- name: Bump versions and publish to NPM
run: npx nx release -y
- 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
5 changes: 5 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"version": {
"conventionalCommits": true
},
"changelog": {
"workspaceChangelog": {
"createRelease": "github"
}
},
"conventionalCommits": {
"types": {
"docs": {
Expand Down

0 comments on commit 8f64cd0

Please sign in to comment.