mirror of
https://github.com/redwoodjs/local-ci.git
synced 2026-09-19 07:54:29 +08:00
71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- ".changeset/**"
|
|
- "packages/**"
|
|
- "crates/**"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "pnpm-lock.yaml"
|
|
- ".github/workflows/release.yml"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
|
|
with:
|
|
version: 10.30.1
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version: 24
|
|
cache: pnpm
|
|
registry-url: https://registry.npmjs.org
|
|
- run: pnpm install
|
|
- run: pnpm check
|
|
- name: Setup Rust
|
|
run: |
|
|
if ! command -v cargo >/dev/null 2>&1; then
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
|
| sh -s -- -y --profile minimal --default-toolchain stable
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
fi
|
|
- name: Check Rust
|
|
run: |
|
|
pnpm rust:fmt:check
|
|
pnpm rust:check
|
|
pnpm rust:clippy
|
|
pnpm rust:test
|
|
- run: pnpm --include-workspace-root=false -r test
|
|
- name: Create Release PR or Publish
|
|
id: changesets
|
|
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
|
|
with:
|
|
publish: pnpm release
|
|
version: pnpm run version
|
|
title: "chore: version packages"
|
|
commit: "chore: version packages"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
NPM_CONFIG_PROVENANCE: true
|
|
- name: Close resolved issues
|
|
if: steps.changesets.outputs.published == 'true'
|
|
run: node scripts/release-closes.mjs apply
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|