Release Canary #7555
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Canary | |
on: | |
workflow_dispatch: | |
inputs: | |
commit: | |
required: true | |
type: string | |
description: "Commit SHA" | |
test: | |
required: false | |
type: boolean | |
default: false | |
description: "Run tests" | |
profile: | |
required: true | |
type: choice | |
default: release | |
options: | |
- release | |
- profiling | |
- ci | |
description: "profiling means release with debug info for profiling, ci means release with debug info and faster build time" | |
permissions: | |
# To publish packages with provenance | |
id-token: write | |
# Allow commenting on issues for `reusable-build.yml` | |
issues: write | |
jobs: | |
get-runner-labels: | |
name: Get Runner Labels | |
uses: ./.github/workflows/get-runner-labels.yml | |
with: | |
force-use-github-runner: true | |
build: | |
name: Build Canary | |
needs: [get-runner-labels] | |
strategy: | |
fail-fast: false # Build and test everything so we can look at all the errors | |
matrix: | |
array: | |
- target: x86_64-unknown-linux-gnu | |
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | |
- target: aarch64-unknown-linux-gnu | |
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | |
- target: x86_64-unknown-linux-musl | |
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | |
- target: aarch64-unknown-linux-musl | |
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | |
- target: i686-pc-windows-msvc | |
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | |
- target: x86_64-pc-windows-msvc | |
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | |
- target: aarch64-pc-windows-msvc | |
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | |
- target: x86_64-apple-darwin | |
runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} | |
- target: aarch64-apple-darwin | |
runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} | |
uses: ./.github/workflows/reusable-build.yml | |
with: | |
ref: ${{inputs.commit}} | |
target: ${{ matrix.array.target }} | |
runner: ${{ matrix.array.runner }} | |
profile: ${{inputs.profile}} | |
test: ${{inputs.test}} | |
release: | |
name: Release Canary | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{inputs.commit}} | |
- name: Pnpm Cache | |
uses: ./.github/actions/pnpm-cache | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
path: artifacts | |
- name: Build node packages | |
run: pnpm run build:js | |
- name: Move artifacts | |
run: node scripts/build-npm.cjs | |
- name: Show binding packages | |
run: ls -R npm | |
- name: Resolve dependencies for bindings | |
run: pnpm install --no-frozen-lockfile | |
- name: Release | |
run: | | |
./x version snapshot | |
./x publish snapshot --tag canary | |
env: | |
NPM_TOKEN: ${{ secrets.RSPACK_CANARY_RELEASE_TOKEN }} |