Skip to content

refactor: generate PR body from changelog (#15) #3

refactor: generate PR body from changelog (#15)

refactor: generate PR body from changelog (#15) #3

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
if: github.ref_name == 'main'
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin,aarch64-apple-darwin,x86_64-pc-windows-msvc
- name: Set up Zig
uses: mlugg/setup-zig@v2
with:
version: 0.14.1
- name: Install cross-compilation tools
run: |
cargo install cargo-zigbuild --locked
cargo install cargo-xwin --locked
- name: Install Node dependencies
run: pnpm install --frozen-lockfile
- name: Create version pull request or publish
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
branch: rivet-release
check: cargo run --release --bin rivet -- check --json
version: cargo run --release --bin rivet -- bump
publish: |
pnpm --dir packages/rivet exec napi build --target x86_64-unknown-linux-gnu --release -x
pnpm --dir packages/rivet exec napi build --target x86_64-pc-windows-msvc --release -x
pnpm --dir packages/rivet exec napi build --target x86_64-apple-darwin --release -x
pnpm --dir packages/rivet exec napi build --target aarch64-apple-darwin --release -x
cd packages/rivet
pnpm exec napi create-npm-dirs
cp rivet-native.linux-x64-gnu.node npm/linux-x64-gnu/
cp ../../target/x86_64-apple-darwin/release/librivet.dylib npm/darwin-x64/rivet-native.darwin-x64.node
cp ../../target/aarch64-apple-darwin/release/librivet.dylib npm/darwin-arm64/rivet-native.darwin-arm64.node
cp ../../target/x86_64-pc-windows-msvc/release/rivet.dll npm/win32-x64-msvc/rivet-native.win32-x64-msvc.node
cd ../..
cargo run --release --bin rivet -- release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}