File tree Expand file tree Collapse file tree 6 files changed +504
-955
lines changed
Expand file tree Collapse file tree 6 files changed +504
-955
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ name: Release
33on :
44 push :
55 tags :
6- - " v*"
6+ - " @wdprlib/ast@*"
7+ - " @wdprlib/parser@*"
8+ - " @wdprlib/render@*"
9+ - " @wdprlib/runtime@*"
710
811concurrency :
912 group : ${{ github.workflow }}-${{ github.ref }}
1720 contents : write
1821 id-token : write
1922 steps :
23+ - name : Extract package name from tag
24+ id : package
25+ run : |
26+ TAG="${GITHUB_REF_NAME}"
27+ # @wdprlib/render@1.0.1 → @wdprlib/render
28+ PACKAGE="${TAG%@*}"
29+ echo "name=${PACKAGE}" >> "$GITHUB_OUTPUT"
30+ echo "Publishing package: ${PACKAGE}"
31+
2032 - uses : actions/checkout@v6
2133 with :
2234 fetch-depth : 0
4355 fi
4456 done
4557
46- - name : Publish to npm
47- run : |
48- # Determine npm tag from git tag (rc/alpha/beta -> rc, otherwise latest)
49- if [[ "${{ github.ref_name }}" == *"-rc"* ]] || [[ "${{ github.ref_name }}" == *"-alpha"* ]] || [[ "${{ github.ref_name }}" == *"-beta"* ]]; then
50- NPM_TAG="rc"
51- else
52- NPM_TAG="latest"
53- fi
54- echo "Publishing with tag: $NPM_TAG"
55- for pkg in packages/*/; do
56- if [ -f "$pkg/package.json" ]; then
57- echo "Publishing $pkg"
58- (cd "$pkg" && npm publish --provenance --access public --tag "$NPM_TAG")
59- fi
60- done
61-
62- - name : Create GitHub Release
63- uses : softprops/action-gh-release@v2
64- with :
65- generate_release_notes : true
58+ - name : Publish to npm (OIDC Trusted Publishing)
59+ run : npx nx release publish --projects=${{ steps.package.outputs.name }}
6660 env :
67- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61+ NPM_CONFIG_PROVENANCE : true
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
2626.eslintcache
2727.cache
2828* .tsbuildinfo
29+ .nx
2930
3031# IntelliJ based IDEs
3132.idea
You can’t perform that action at this time.
0 commit comments