Skip to content

chore(pipeline): update generated preview evidence workflow #11

chore(pipeline): update generated preview evidence workflow

chore(pipeline): update generated preview evidence workflow #11

# Generated by async-pipeline. Do not edit by hand.
# Run: async-pipeline github generate
name: Async Pipeline
on:
pull_request:
types:
- "opened"
- "ready_for_review"
- "reopened"
- "synchronize"
push:
branches:
- "main"
release:
workflow_dispatch:
inputs:
job:
description: "Pipeline job to run"
required: true
type: choice
options:
- "publish"
- "release-doctor"
permissions:
contents: read
jobs:
publish:
name: publish
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.job == 'publish') || (github.event_name == 'release')
runs-on: ubuntu-latest
environment:
name: "npm-publish"
url: "https://www.npmjs.com/package/@async/github-app"
permissions:
contents: write
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
package-manager-cache: false
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.20.0 --activate
- name: Use current npm
run: npm install -g npm@11.16.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run pipeline task pack
uses: async/actions/run@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack"
check-generated: false
artifact-name: async-pipeline-${{ github.job }}-pack-runs
env:
CI: true
- name: Plan release package
uses: async/actions/doctor@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: plan
package-path: "."
evidence-dir: .async/release
release-command: "pnpm dlx github:async/release#v0.1.3"
env:
CI: true
- name: Inspect release package
uses: async/actions/doctor@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: inspect
package-path: "."
evidence-dir: .async/release
release-command: "pnpm dlx github:async/release#v0.1.3"
env:
CI: true
- name: Check release changelog
uses: async/actions/doctor@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: changelog
package-path: "."
evidence-dir: .async/release
release-command: "pnpm dlx github:async/release#v0.1.3"
env:
CI: true
- name: Render release notes
uses: async/actions/doctor@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: notes
package-path: "."
evidence-dir: .async/release
release-command: "pnpm dlx github:async/release#v0.1.3"
env:
CI: true
- name: Create or update GitHub Release
uses: async/actions/publish@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
package-path: "."
mode: github-release
registry: "https://registry.npmjs.org"
dist-tag: "latest"
notes-file: .async/release/release-notes.md
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish GitHub Packages mirror
uses: async/actions/publish@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
package-path: "."
mode: github-packages
registry: "https://npm.pkg.github.com"
dist-tag: "latest"
token-env-name: GITHUB_TOKEN
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish npm package
uses: async/actions/publish@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
package-path: "."
mode: npm
registry: "https://registry.npmjs.org"
dist-tag: "latest"
token-env-name: NODE_AUTH_TOKEN
provenance: true
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release doctor
uses: async/actions/doctor@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: doctor
package-path: "."
evidence-dir: .async/release
release-command: "pnpm dlx github:async/release#v0.1.3"
network: live
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-doctor:
name: release-doctor
if: github.event_name == 'workflow_dispatch' && github.event.inputs.job == 'release-doctor'
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
package-manager-cache: false
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.20.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run release doctor
uses: async/actions/doctor@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: doctor
package-path: "."
evidence-dir: .async/release
release-command: "pnpm dlx github:async/release#v0.1.3"
network: live
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
snapshot:
name: snapshot
if: github.event_name == 'push' && (github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
package-manager-cache: false
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.20.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run pipeline task pack
uses: async/actions/run@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack"
check-generated: false
artifact-name: async-pipeline-${{ github.job }}-pack-runs
env:
CI: true
- name: Plan main package preview
run: pnpm dlx github:async/release#v0.1.3 preview plan --package . --mode main --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json
- name: Stage main package preview
run: pnpm dlx github:async/release#v0.1.3 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
- name: Inspect main package preview
run: pnpm dlx github:async/release#v0.1.3 preview inspect --package . --mode main --namespace "${{ github.repository_owner }}" --source-repository "${{ github.repository }}" --source-sha "${{ github.sha }}" --evidence-dir .async/release --json
- name: Publish main package preview
id: async-main-package-preview
uses: async/actions/preview@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
package-path: "."
target-registry: "https://npm.pkg.github.com"
mode: main
comment: false
token-env-name: "GITHUB_TOKEN"
release-package: "github:async/release#v0.1.3"
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Verify main package preview
if: steps.async-main-package-preview.outputs.package-spec != ''
run: pnpm dlx github:async/release#v0.1.3 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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
verify:
name: verify
if: (github.event_name == 'pull_request') || (github.event_name == 'push' && (github.ref == 'refs/heads/main')) || (github.event_name == 'release')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
package-manager-cache: false
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.20.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run pipeline job
uses: async/actions/run@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
command: "pnpm async-pipeline github check && pnpm async-pipeline run verify"
check-generated: false
artifact-name: async-pipeline-${{ github.job }}-runs
env:
CI: true
package-preview:
name: package-preview
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
packages: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
package-manager-cache: false
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.20.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run package preview target
uses: async/actions/run@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
command: "pnpm async-pipeline github check && pnpm async-pipeline run-task pack"
check-generated: false
artifact-name: async-pipeline-${{ github.job }}-runs
env:
CI: true
- name: Plan PR package preview
run: pnpm dlx github:async/release#v0.1.3 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 }}"
- name: Stage PR package preview
run: pnpm dlx github:async/release#v0.1.3 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 }}"
- name: Inspect PR package preview
run: pnpm dlx github:async/release#v0.1.3 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 }}"
- name: Publish package preview
id: async-package-preview
uses: async/actions/preview@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
package-path: "."
target-registry: "https://npm.pkg.github.com"
mode: pr
comment: true
token-env-name: "GITHUB_TOKEN"
release-package: "github:async/release#v0.1.3"
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Verify PR package preview
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && steps.async-package-preview.outputs.package-spec != ''
run: pnpm dlx github:async/release#v0.1.3 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 }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment package preview
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && steps.async-package-preview.outputs.comment-body != ''
uses: async/actions/comment@3d8f86b960b16f4a61a22533ebcaca9a955a0f9b # v0.1.17
with:
mode: pr-comment
repository: ${{ github.repository }}
number: ${{ github.event.pull_request.number }}
marker: ${{ steps.async-package-preview.outputs.comment-marker }}
body: ${{ steps.async-package-preview.outputs.comment-body }}
token: ${{ secrets.GITHUB_TOKEN }}