File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ # Publishes a released version to GitHub Packages. release-please.yml calls it after a release; it can
4+ # also be started by hand for an existing tag, for example when a publish failed after the tag was made.
5+
6+ on :
7+ workflow_call :
8+ inputs :
9+ ref :
10+ description : " Tag or commit to publish"
11+ required : true
12+ type : string
13+ workflow_dispatch :
14+ inputs :
15+ ref :
16+ description : " Tag to publish, e.g. v0.1.0"
17+ required : true
18+ type : string
19+
20+ permissions :
21+ contents : read
22+ packages : write
23+
24+ jobs :
25+ publish :
26+ name : publish to GitHub Packages
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@v7
30+ with :
31+ ref : ${{ inputs.ref }}
32+ persist-credentials : false
33+
34+ - uses : pnpm/action-setup@v6.1.1
35+
36+ - uses : actions/setup-node@v7.1.0
37+ with :
38+ node-version-file : .nvmrc
39+ cache : pnpm
40+ registry-url : https://npm.pkg.github.com
41+ scope : ' @onelitefeathernet'
42+
43+ - run : pnpm install --frozen-lockfile
44+
45+ # nuxt-module-build reads .nuxt/tsconfig.json, which `nuxt-module-build prepare` writes.
46+ - run : pnpm dev:prepare
47+
48+ - run : pnpm publish --no-git-checks
49+ env :
50+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11name : release-please
22
33# One release for the whole package. release-please keeps the release pull request up to date on main;
4- # when it is merged, the release is created and tagged. The publish job then publishes the released
4+ # when it is merged, the release is created and tagged. The publish job (publish.yml) then publishes the released
55# commit to GitHub Packages. Tags created with GITHUB_TOKEN start no workflow, so nothing listens for a
66# tag push.
77
@@ -18,30 +18,11 @@ jobs:
1818 uses : OneLiteFeatherNET/workflows/.github/workflows/release-please.yml@v2.9.1
1919
2020 publish :
21- name : publish to GitHub Packages
2221 needs : release-please
2322 if : needs.release-please.outputs.release_created == 'true'
24- runs-on : ubuntu-latest
2523 permissions :
2624 contents : read
2725 packages : write
28- steps :
29- - uses : actions/checkout@v7
30- with :
31- ref : ${{ needs.release-please.outputs.sha }}
32- persist-credentials : false
33-
34- - uses : pnpm/action-setup@v6.1.1
35-
36- - uses : actions/setup-node@v7.1.0
37- with :
38- node-version-file : .nvmrc
39- cache : pnpm
40- registry-url : https://npm.pkg.github.com
41- scope : ' @onelitefeathernet'
42-
43- - run : pnpm install --frozen-lockfile
44-
45- - run : pnpm publish --no-git-checks
46- env :
47- NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26+ uses : ./.github/workflows/publish.yml
27+ with :
28+ ref : ${{ needs.release-please.outputs.sha }}
You can’t perform that action at this time.
0 commit comments