@@ -12,77 +12,36 @@ permissions:
1212name : release-please
1313
1414jobs :
15- release :
16- runs-on : ubuntu-latest
17- outputs :
18- release-published : ${{ steps.release.outputs.release_created }}
19- steps :
20- - name : Release please
21- uses : googleapis/release-please-action@v4
22- id : release
23- with :
24- # this assumes that you have created a personal access token
25- # (PAT) and configured it as a GitHub action secret named
26- # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
27- token : ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
28- # this is a built-in strategy in release-please, see "Action Inputs"
29- # for more options
30- release-type : node
31- # create a release from a path other than the repository's root
32- # path: pkg/cmd
33- # The short ref name of the branch or tag that triggered
34- # the workflow run. For example, `main` or `1.x`
35- # target-branch: ${{ github.ref_name }}
15+ # release:
16+ # runs-on: ubuntu-latest
17+ # outputs:
18+ # release-published: ${{ steps.release.outputs.release_created }}
19+ # steps:
20+ # - name: Release please
21+ # uses: googleapis/release-please-action@v4
22+ # id: release
23+ # with:
24+ # # this assumes that you have created a personal access token
25+ # # (PAT) and configured it as a GitHub action secret named
26+ # # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
27+ # token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
28+ # # this is a built-in strategy in release-please, see "Action Inputs"
29+ # # for more options
30+ # release-type: node
31+ # # create a release from a path other than the repository's root
32+ # # path: pkg/cmd
33+ # # The short ref name of the branch or tag that triggered
34+ # # the workflow run. For example, `main` or `1.x`
35+ # # target-branch: ${{ github.ref_name }}
3636
37- # If true, do not attempt to create releases.
38- # This is useful if splitting release tagging from PR creation.
39- # skip-github-release: true
37+ # # If true, do not attempt to create releases.
38+ # # This is useful if splitting release tagging from PR creation.
39+ # # skip-github-release: true
4040
4141 publish :
42- runs-on : ubuntu-latest
43- if : needs.release.outputs.release-published
44- needs : release
45- steps :
46- - name : Check out repository
47- uses : actions/checkout@v6
48- with :
49- fetch-depth : 0
50- persist-credentials : false
51-
52- - name : Set up pnpm
53- uses : pnpm/action-setup@v4
54- with :
55- version : 10
56- run_install : false
57-
58- - name : Set up Node.js
59- uses : actions/setup-node@v6
60- with :
61- node-version-file : .node-version
62- registry-url : https://registry.npmjs.org/
63- cache : pnpm
64-
65- - name : Restore cache
66- id : dependencies-cache
67- uses : actions/cache@v5
68- with :
69- path : |
70- **/node_modules
71- key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
72- restore-keys : |
73- ${{ runner.os }}-pnpm-
74-
75- - name : Install Dependencies 🔧
76- if : steps.dependencies-cache.outputs.cache-hit != 'true'
77- run : |
78- pnpm install
79-
80- - name : Build ☕️
81- run : |
82- pnpm build
83-
84- - name : Publish to NPM
85- run : |
86- npm publish
87- env :
88- NPM_CONFIG_PROVENANCE : true
42+ # if: needs.release.outputs.release-published
43+ permissions :
44+ id-token : write # Required for OIDC
45+ contents : read
46+ # needs: release
47+ uses : ./.github/workflows/publish.yml
0 commit comments