|
| 1 | +# Generated by async-pipeline. Do not edit by hand. |
| 2 | +# Run: async-pipeline github generate |
| 3 | + |
| 4 | +name: Async Pipeline |
| 5 | + |
| 6 | +on: |
| 7 | + pull_request: |
| 8 | + types: |
| 9 | + - "opened" |
| 10 | + - "ready_for_review" |
| 11 | + - "reopened" |
| 12 | + - "synchronize" |
| 13 | + push: |
| 14 | + branches: |
| 15 | + - "main" |
| 16 | + release: |
| 17 | + types: |
| 18 | + - "published" |
| 19 | + workflow_dispatch: |
| 20 | + inputs: |
| 21 | + job: |
| 22 | + description: "Pipeline job to run" |
| 23 | + required: true |
| 24 | + type: choice |
| 25 | + options: |
| 26 | + - "publish" |
| 27 | + - "release-doctor" |
| 28 | + - "verify" |
| 29 | + |
| 30 | +permissions: |
| 31 | + contents: read |
| 32 | + |
| 33 | +jobs: |
| 34 | + publish: |
| 35 | + name: publish |
| 36 | + if: (github.event_name == 'workflow_dispatch' && github.event.inputs.job == 'publish') || (github.event_name == 'release' && (github.event.action == 'published')) |
| 37 | + runs-on: ubuntu-latest |
| 38 | + environment: |
| 39 | + name: "npm-publish" |
| 40 | + url: "https://www.npmjs.com/package/@async/cli" |
| 41 | + permissions: |
| 42 | + contents: write |
| 43 | + id-token: write |
| 44 | + packages: write |
| 45 | + steps: |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 48 | + |
| 49 | + - name: Setup pnpm runtime |
| 50 | + uses: pnpm/setup@cf03a9b516e09bc5a90f041fc26fc930c9dc631b # v1.0.0 |
| 51 | + with: |
| 52 | + version: 11.7.0 |
| 53 | + runtime: node@24 |
| 54 | + install: false |
| 55 | + cache: false |
| 56 | + |
| 57 | + - name: Use current npm |
| 58 | + run: npm install -g npm@11.16.0 |
| 59 | + |
| 60 | + - name: Install dependencies |
| 61 | + run: pnpm install --frozen-lockfile |
| 62 | + |
| 63 | + - name: Run pipeline task pack |
| 64 | + uses: async/actions/run@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 65 | + with: |
| 66 | + command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack" |
| 67 | + check-generated: false |
| 68 | + artifact-name: async-pipeline-${{ github.job }}-pack-runs |
| 69 | + env: |
| 70 | + CI: true |
| 71 | + |
| 72 | + - name: Plan release package |
| 73 | + uses: async/actions/doctor@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 74 | + with: |
| 75 | + mode: plan |
| 76 | + package-path: "." |
| 77 | + evidence-dir: .async/release |
| 78 | + release-command: "pnpm dlx github:async/release#v0.1.5" |
| 79 | + env: |
| 80 | + CI: true |
| 81 | + |
| 82 | + - name: Inspect release package |
| 83 | + uses: async/actions/doctor@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 84 | + with: |
| 85 | + mode: inspect |
| 86 | + package-path: "." |
| 87 | + evidence-dir: .async/release |
| 88 | + release-command: "pnpm dlx github:async/release#v0.1.5" |
| 89 | + env: |
| 90 | + CI: true |
| 91 | + |
| 92 | + - name: Check release changelog |
| 93 | + uses: async/actions/doctor@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 94 | + with: |
| 95 | + mode: changelog |
| 96 | + package-path: "." |
| 97 | + evidence-dir: .async/release |
| 98 | + release-command: "pnpm dlx github:async/release#v0.1.5" |
| 99 | + env: |
| 100 | + CI: true |
| 101 | + |
| 102 | + - name: Render release notes |
| 103 | + uses: async/actions/doctor@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 104 | + with: |
| 105 | + mode: notes |
| 106 | + package-path: "." |
| 107 | + evidence-dir: .async/release |
| 108 | + release-command: "pnpm dlx github:async/release#v0.1.5" |
| 109 | + env: |
| 110 | + CI: true |
| 111 | + |
| 112 | + - name: Create or update GitHub Release |
| 113 | + uses: async/actions/publish@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 114 | + with: |
| 115 | + package-path: "." |
| 116 | + mode: github-release |
| 117 | + registry: "https://registry.npmjs.org" |
| 118 | + dist-tag: "latest" |
| 119 | + notes-file: .async/release/release-notes.md |
| 120 | + env: |
| 121 | + CI: true |
| 122 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 123 | + |
| 124 | + - name: Publish GitHub Packages mirror |
| 125 | + uses: async/actions/publish@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 126 | + with: |
| 127 | + package-path: "." |
| 128 | + mode: github-packages |
| 129 | + registry: "https://npm.pkg.github.com" |
| 130 | + dist-tag: "latest" |
| 131 | + token-env-name: GITHUB_TOKEN |
| 132 | + env: |
| 133 | + CI: true |
| 134 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 135 | + |
| 136 | + - name: Publish npm package |
| 137 | + uses: async/actions/publish@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 138 | + with: |
| 139 | + package-path: "." |
| 140 | + mode: npm |
| 141 | + registry: "https://registry.npmjs.org" |
| 142 | + dist-tag: "latest" |
| 143 | + token-env-name: NODE_AUTH_TOKEN |
| 144 | + provenance: true |
| 145 | + env: |
| 146 | + CI: true |
| 147 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 148 | + |
| 149 | + - name: Run release doctor |
| 150 | + uses: async/actions/doctor@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 151 | + with: |
| 152 | + mode: doctor |
| 153 | + package-path: "." |
| 154 | + evidence-dir: .async/release |
| 155 | + release-command: "pnpm dlx github:async/release#v0.1.5" |
| 156 | + network: live |
| 157 | + env: |
| 158 | + CI: true |
| 159 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 160 | + |
| 161 | + release-doctor: |
| 162 | + name: release-doctor |
| 163 | + if: github.event_name == 'workflow_dispatch' && github.event.inputs.job == 'release-doctor' |
| 164 | + runs-on: ubuntu-latest |
| 165 | + permissions: |
| 166 | + contents: read |
| 167 | + packages: read |
| 168 | + steps: |
| 169 | + - name: Checkout |
| 170 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 171 | + |
| 172 | + - name: Setup pnpm runtime |
| 173 | + uses: pnpm/setup@cf03a9b516e09bc5a90f041fc26fc930c9dc631b # v1.0.0 |
| 174 | + with: |
| 175 | + version: 11.7.0 |
| 176 | + runtime: node@24 |
| 177 | + install: false |
| 178 | + cache: false |
| 179 | + |
| 180 | + - name: Install dependencies |
| 181 | + run: pnpm install --frozen-lockfile |
| 182 | + |
| 183 | + - name: Run pipeline task pack |
| 184 | + uses: async/actions/run@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 185 | + with: |
| 186 | + command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack" |
| 187 | + check-generated: false |
| 188 | + artifact-name: async-pipeline-${{ github.job }}-pack-runs |
| 189 | + env: |
| 190 | + CI: true |
| 191 | + |
| 192 | + - name: Run release doctor |
| 193 | + uses: async/actions/doctor@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 194 | + with: |
| 195 | + mode: doctor |
| 196 | + package-path: "." |
| 197 | + evidence-dir: .async/release |
| 198 | + release-command: "pnpm dlx github:async/release#v0.1.5" |
| 199 | + network: live |
| 200 | + env: |
| 201 | + CI: true |
| 202 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 203 | + |
| 204 | + snapshot: |
| 205 | + name: snapshot |
| 206 | + if: github.event_name == 'push' && (github.ref == 'refs/heads/main') |
| 207 | + runs-on: ubuntu-latest |
| 208 | + permissions: |
| 209 | + contents: write |
| 210 | + packages: write |
| 211 | + steps: |
| 212 | + - name: Checkout |
| 213 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 214 | + |
| 215 | + - name: Setup pnpm runtime |
| 216 | + uses: pnpm/setup@cf03a9b516e09bc5a90f041fc26fc930c9dc631b # v1.0.0 |
| 217 | + with: |
| 218 | + version: 11.7.0 |
| 219 | + runtime: node@24 |
| 220 | + install: false |
| 221 | + cache: false |
| 222 | + |
| 223 | + - name: Install dependencies |
| 224 | + run: pnpm install --frozen-lockfile |
| 225 | + |
| 226 | + - name: Run pipeline task pack |
| 227 | + uses: async/actions/run@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 228 | + with: |
| 229 | + command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack" |
| 230 | + check-generated: false |
| 231 | + artifact-name: async-pipeline-${{ github.job }}-pack-runs |
| 232 | + env: |
| 233 | + CI: true |
| 234 | + |
| 235 | + - name: Plan main package preview |
| 236 | + run: pnpm dlx github:async/release#v0.1.5 preview plan --package . --mode main --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json |
| 237 | + |
| 238 | + - name: Stage main package preview |
| 239 | + run: pnpm dlx github:async/release#v0.1.5 preview stage --package . --mode main --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json --registry https://npm.pkg.github.com |
| 240 | + |
| 241 | + - name: Inspect main package preview |
| 242 | + run: pnpm dlx github:async/release#v0.1.5 preview inspect --package . --mode main --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json |
| 243 | + |
| 244 | + - name: Publish main package preview |
| 245 | + id: async-main-package-preview |
| 246 | + uses: async/actions/preview@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 247 | + with: |
| 248 | + package-path: "." |
| 249 | + target-registry: "https://npm.pkg.github.com" |
| 250 | + mode: main |
| 251 | + comment: false |
| 252 | + token-env-name: "GITHUB_TOKEN" |
| 253 | + release-package: "github:async/release#v0.1.5" |
| 254 | + env: |
| 255 | + CI: true |
| 256 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 257 | + |
| 258 | + - name: Verify main package preview |
| 259 | + if: steps.async-main-package-preview.outputs.package-spec != '' |
| 260 | + run: pnpm dlx github:async/release#v0.1.5 preview doctor --package . --mode main --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json --registry https://npm.pkg.github.com --network live |
| 261 | + env: |
| 262 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 263 | + |
| 264 | + verify: |
| 265 | + name: verify |
| 266 | + if: (github.event_name == 'pull_request') || (github.event_name == 'push' && (github.ref == 'refs/heads/main')) || (github.event_name == 'release' && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.job == 'verify') |
| 267 | + runs-on: ubuntu-latest |
| 268 | + steps: |
| 269 | + - name: Checkout |
| 270 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 271 | + |
| 272 | + - name: Setup pnpm runtime |
| 273 | + uses: pnpm/setup@cf03a9b516e09bc5a90f041fc26fc930c9dc631b # v1.0.0 |
| 274 | + with: |
| 275 | + version: 11.7.0 |
| 276 | + runtime: node@24 |
| 277 | + install: false |
| 278 | + cache: false |
| 279 | + |
| 280 | + - name: Install dependencies |
| 281 | + run: pnpm install --frozen-lockfile |
| 282 | + |
| 283 | + - name: Run pipeline job |
| 284 | + uses: async/actions/run@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 285 | + with: |
| 286 | + command: "pnpm async-pipeline github check && pnpm async-pipeline run verify" |
| 287 | + check-generated: false |
| 288 | + artifact-name: async-pipeline-${{ github.job }}-runs |
| 289 | + env: |
| 290 | + CI: true |
| 291 | + |
| 292 | + package-preview: |
| 293 | + name: package-preview |
| 294 | + if: github.event_name == 'pull_request' && github.event.pull_request.draft == false |
| 295 | + runs-on: ubuntu-latest |
| 296 | + permissions: |
| 297 | + contents: read |
| 298 | + issues: write |
| 299 | + packages: write |
| 300 | + pull-requests: write |
| 301 | + steps: |
| 302 | + - name: Checkout |
| 303 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 304 | + with: |
| 305 | + persist-credentials: false |
| 306 | + |
| 307 | + - name: Setup pnpm runtime |
| 308 | + uses: pnpm/setup@cf03a9b516e09bc5a90f041fc26fc930c9dc631b # v1.0.0 |
| 309 | + with: |
| 310 | + version: 11.7.0 |
| 311 | + runtime: node@24 |
| 312 | + install: false |
| 313 | + cache: false |
| 314 | + |
| 315 | + - name: Install dependencies |
| 316 | + run: pnpm install --frozen-lockfile |
| 317 | + |
| 318 | + - name: Run package preview target |
| 319 | + uses: async/actions/run@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 320 | + with: |
| 321 | + command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack" |
| 322 | + check-generated: false |
| 323 | + artifact-name: async-pipeline-${{ github.job }}-runs |
| 324 | + env: |
| 325 | + CI: true |
| 326 | + |
| 327 | + - name: Plan PR package preview |
| 328 | + run: pnpm dlx github:async/release#v0.1.5 preview plan --package . --mode pr --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json --pr-number "${{ github.event.pull_request.number }}" --head-sha "${{ github.event.pull_request.head.sha }}" |
| 329 | + |
| 330 | + - name: Stage PR package preview |
| 331 | + run: pnpm dlx github:async/release#v0.1.5 preview stage --package . --mode pr --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json --registry https://npm.pkg.github.com --pr-number "${{ github.event.pull_request.number }}" --head-sha "${{ github.event.pull_request.head.sha }}" |
| 332 | + |
| 333 | + - name: Inspect PR package preview |
| 334 | + run: pnpm dlx github:async/release#v0.1.5 preview inspect --package . --mode pr --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json --pr-number "${{ github.event.pull_request.number }}" --head-sha "${{ github.event.pull_request.head.sha }}" |
| 335 | + |
| 336 | + - name: Publish package preview |
| 337 | + id: async-package-preview |
| 338 | + uses: async/actions/preview@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 339 | + with: |
| 340 | + package-path: "." |
| 341 | + target-registry: "https://npm.pkg.github.com" |
| 342 | + mode: pr |
| 343 | + comment: true |
| 344 | + token-env-name: "GITHUB_TOKEN" |
| 345 | + release-package: "github:async/release#v0.1.5" |
| 346 | + env: |
| 347 | + CI: true |
| 348 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 349 | + |
| 350 | + - name: Verify PR package preview |
| 351 | + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && steps.async-package-preview.outputs.package-spec != '' |
| 352 | + run: pnpm dlx github:async/release#v0.1.5 preview doctor --package . --mode pr --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json --registry https://npm.pkg.github.com --network live --pr-number "${{ github.event.pull_request.number }}" --head-sha "${{ github.event.pull_request.head.sha }}" |
| 353 | + env: |
| 354 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 355 | + |
| 356 | + - name: Comment package preview |
| 357 | + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && steps.async-package-preview.outputs.comment-body != '' |
| 358 | + uses: async/actions/comment@41e79159e12a7a2092c6911d850450082a8add09 # v0.1.20 |
| 359 | + with: |
| 360 | + mode: pr-comment |
| 361 | + repository: ${{ github.repository }} |
| 362 | + number: ${{ github.event.pull_request.number }} |
| 363 | + marker: ${{ steps.async-package-preview.outputs.comment-marker }} |
| 364 | + body: ${{ steps.async-package-preview.outputs.comment-body }} |
| 365 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments