Files
anonklub/.github/workflows/release.yml
2024-08-27 14:57:47 +02:00

62 lines
1.6 KiB
YAML

name: Release
on:
push:
branches: ["main"]
paths:
[
".github/workflows/release.yml",
".changeset/*.md",
"pkgs/**/package.json",
]
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9.4.0
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm --filter "./pkgs/**" --ignore-scripts --no-frozen-lockfile i
- name: Install rust toolchain
run: |
rustup install nightly-2024-07-25-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2024-07-25-x86_64-unknown-linux-gnu
- name: Release
uses: changesets/action@v1.4.7
with:
publish: pnpm publish.pkgs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}