-
Notifications
You must be signed in to change notification settings - Fork 156
46 lines (38 loc) · 1.35 KB
/
release.yml
File metadata and controls
46 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release
on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
inputs:
dry_run:
description: "Dry run: build artifacts but skip publishing/releasing."
required: false
type: boolean
default: false
permissions:
id-token: write
contents: write
jobs:
publish-crates:
if: (github.head_ref == 'knope/release' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@113a77a4ce971c41332f2129c3d995df993cf746 # v1.17.8
- name: Install cargo-release
run: cargo binstall cargo-release@1.1.2 --no-confirm
- name: Publish to crates.io
run: cargo release publish --workspace --no-confirm --no-verify ${{ inputs.dry_run != true && '--execute' || '' }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
call-node-ffi:
name: Call Node FFI Builds
if: (github.head_ref == 'knope/release' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/node-builds.yml
with:
dry_run: ${{ inputs.dry_run || false }}