Skip to content

Commit 19f9488

Browse files
authored
Merge pull request #110 from filecoin-project/wip-release-automation
ci: create release workflow that uses cargo release
2 parents b06f9fb + a635660 commit 19f9488

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
level:
7+
description: 'Release level'
8+
required: true
9+
default: 'patch'
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
release:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
# The contents write should allow:
25+
# 1. Push to the branch of the repository that triggered the workflow.
26+
# 2. Create a tag.
27+
# 3. Push to crates.io.
28+
contents: write
29+
# The id-token write should allow the OIDC token exchange
30+
id-token: write
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install required packages
34+
run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
35+
- name: Install cargo release
36+
run: cargo install --version 0.25.17 cargo-release
37+
- name: Set git user
38+
run: |
39+
git config --global user.email "${GITHUB_TRIGGERING_ACTOR}@users.noreply.github.com"
40+
git config --global user.name "${GITHUB_TRIGGERING_ACTOR}"
41+
- uses: rust-lang/crates-io-auth-action@v1
42+
id: auth
43+
- name: Run cargo release
44+
env:
45+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
46+
run: cargo release ${{ github.event.inputs.level }} --no-confirm --execute

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ bincode = "1.1.2"
1414
blstrs = "0.7"
1515
lazy_static = "1.2"
1616
serde = "1.0.104"
17-
filecoin-proofs-v1 = { package = "filecoin-proofs", version = "~18.1.0", default-features = false }
18-
fr32 = { version = "~11.1.0", default-features = false }
19-
storage-proofs-core = { version = "~18.1.0", default-features = false }
17+
filecoin-proofs-v1 = { package = "filecoin-proofs", version = "~19.0.0", default-features = false }
18+
fr32 = { version = "~12.0.0", default-features = false }
19+
storage-proofs-core = { version = "~19.0.0", default-features = false }
2020

2121
[features]
2222
default = ["opencl", "cuda"]

0 commit comments

Comments
 (0)