Skip to content

Commit 434e9d0

Browse files
committed
Revert "ci(pipeline): stop stable GitHub Packages mirror"
This reverts commit 576796a.
1 parent 576796a commit 434e9d0

5 files changed

Lines changed: 41 additions & 8 deletions

File tree

.async-pipeline/tasks.lock.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
"name": "pipeline:pages",
4646
"value": "async-pipeline run-task docs.site"
4747
},
48+
{
49+
"name": "pipeline:publish:github:release",
50+
"value": "async-pipeline publish github release --package . --registry https://npm.pkg.github.com"
51+
},
4852
{
4953
"name": "pipeline:publish:npm",
5054
"value": "async-pipeline publish npm --package ."
@@ -97,6 +101,10 @@
97101
"name": "pipeline:pages",
98102
"value": "async-pipeline run-task docs.site"
99103
},
104+
{
105+
"name": "pipeline:publish:github:release",
106+
"value": "async-pipeline publish github release --package . --registry https://npm.pkg.github.com"
107+
},
100108
{
101109
"name": "pipeline:publish:npm",
102110
"value": "async-pipeline publish npm --package ."
@@ -118,6 +126,6 @@
118126
"value": "async-pipeline sync generate"
119127
}
120128
],
121-
"hash": "sha256:637daee2f3438a31cb100dfa3d5441ea792476889740fee8ac6e43375964788d",
122-
"generatedAt": "2026-06-18T10:47:00.070Z"
129+
"hash": "sha256:0f188d23dca0b5526dce051a36d2dabed86a23b1823d6b0d42f157e19148c68a",
130+
"generatedAt": "2026-06-18T10:37:17.205Z"
123131
}

.github/async-pipeline.lock.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"generator": "@async/pipeline",
44
"config": "pipeline.ts",
55
"workflow": ".github/workflows/async-pipeline.yml",
6-
"hash": "sha256:8d65ade0972b642c96005d29da8b343f28cc494c9038d49f9364b42f1dd1e519",
7-
"generatedAt": "2026-06-18T10:46:59.925Z",
6+
"hash": "sha256:ff505c9546fbc9043e54232d7642a1d6a2c6189b7263c0a4b1b8dd13ecf769b6",
7+
"generatedAt": "2026-06-18T10:37:17.001Z",
88
"triggers": {
99
"pull_request": {},
1010
"push": {
@@ -48,7 +48,8 @@
4848
},
4949
"github": {
5050
"permissions": {
51-
"contents": "write"
51+
"contents": "write",
52+
"packages": "write"
5253
}
5354
},
5455
"if": "(github.event_name == 'workflow_dispatch' && github.event.inputs.job == 'publish') || (github.event_name == 'release' && (github.event.action == 'published'))"

.github/workflows/async-pipeline.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
permissions:
3838
contents: write
3939
id-token: write
40+
packages: write
4041
steps:
4142
- name: Checkout
4243
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -87,6 +88,18 @@ jobs:
8788
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8889
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
8990

91+
- name: Publish GitHub Packages mirror
92+
uses: async/actions/publish@v0
93+
with:
94+
package-path: "."
95+
mode: github-packages
96+
registry: "https://npm.pkg.github.com"
97+
dist-tag: "latest"
98+
env:
99+
CI: true
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
102+
90103
- name: Publish npm package
91104
uses: async/actions/publish@v0
92105
with:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"pipeline:github:generate": "async-pipeline github generate",
118118
"pipeline:pages": "async-pipeline run-task docs.site",
119119
"pipeline:publish": "async-pipeline run publish",
120+
"pipeline:publish:github:release": "async-pipeline publish github release --package . --registry https://npm.pkg.github.com",
120121
"pipeline:publish:npm": "async-pipeline publish npm --package .",
121122
"pipeline:release-doctor": "async-pipeline run release-doctor",
122123
"pipeline:release:doctor": "async-pipeline release doctor --package .",

pipeline.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default definePipeline({
3434
"github:check": "github check",
3535
"github:generate": "github generate",
3636
"pages": "run-task docs.site",
37+
"publish:github:release": "publish github release --package . --registry https://npm.pkg.github.com",
3738
"publish:npm": "publish npm --package .",
3839
"release:doctor": "release doctor --package .",
3940
"release:ensure": "release ensure --package .",
@@ -112,11 +113,19 @@ export default definePipeline({
112113
run: sh`pnpm async-pipeline release ensure --package ${packagePath}`
113114
}),
114115

115-
publish: task({
116-
description: "Publish the verified release to npm after release ensure, then run release doctor.",
116+
"publish-github": task({
117+
description: "Publish the stable GitHub Packages mirror before npm publishing.",
117118
dependsOn: ["release-ensure"],
118119
inputs: ["source"],
119120
cache: false,
121+
run: sh`pnpm async-pipeline publish github release --package ${packagePath} --registry https://npm.pkg.github.com`
122+
}),
123+
124+
publish: task({
125+
description: "Publish the verified release to npm after the GitHub Packages mirror, then run release doctor.",
126+
dependsOn: ["publish-github"],
127+
inputs: ["source"],
128+
cache: false,
120129
run: [
121130
sh`pnpm async-pipeline publish npm --package ${packagePath}`,
122131
sh`pnpm async-pipeline release doctor --package ${packagePath}`
@@ -154,7 +163,8 @@ export default definePipeline({
154163
},
155164
github: {
156165
permissions: {
157-
contents: "write"
166+
contents: "write",
167+
packages: "write"
158168
}
159169
}
160170
}),

0 commit comments

Comments
 (0)