From 09fbfcb4e84dab1391ab33200baa724e1beb2c15 Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 16 Jul 2025 16:16:52 +0200 Subject: [PATCH 1/5] ci: automate the release process --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..28235ded --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release + +on: + # TODO: Remove this after testing + push: + workflow_dispatch: + inputs: + dry_run: + description: 'Dry run' + required: true + default: true + type: boolean + level: + description: 'Release level' + required: true + default: 'patch' + type: choice + options: + - patch + - minor + - major + +jobs: + release: + runs-on: ubuntu-latest + # The permissions should allow the user to: + # 1. Push to the branch of the repository that triggered the workflow. + # 2. Create a tag. + # 3. Push to crates.io. + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - name: Install required packages + run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev + - name: Install cargo release + run: cargo install --version 0.25.17 cargo-release + - name: Run cargo release + # TODO: Uncomment this after testing + # run: cargo release ${{ (!github.event.inputs.dry_run) && '--execute' || '' }} --no-confirm ${{ github.event.inputs.level }} + # TODO: Remove this after testing + run: cargo release major From edafc5718da6dc87ae2533a4a5e7d63ecce10699 Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 16 Jul 2025 16:52:49 +0200 Subject: [PATCH 2/5] chore: update dependencies --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f0d9b568..11c16105 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,9 @@ bincode = "1.1.2" blstrs = "0.7" lazy_static = "1.2" serde = "1.0.104" -filecoin-proofs-v1 = { package = "filecoin-proofs", version = "~18.1.0", default-features = false } -fr32 = { version = "~11.1.0", default-features = false } -storage-proofs-core = { version = "~18.1.0", default-features = false } +filecoin-proofs-v1 = { package = "filecoin-proofs", version = "~19.0.0", default-features = false } +fr32 = { version = "~12.0.0", default-features = false } +storage-proofs-core = { version = "~19.0.0", default-features = false } [features] default = ["opencl", "cuda"] From b2618e243dc735565dfda7f2aeefa0a681a97deb Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 23 Jul 2025 15:21:06 +0200 Subject: [PATCH 3/5] ci: bump the version locally in dry run --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28235ded..2f2803e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,6 @@ jobs: run: cargo install --version 0.25.17 cargo-release - name: Run cargo release # TODO: Uncomment this after testing - # run: cargo release ${{ (!github.event.inputs.dry_run) && '--execute' || '' }} --no-confirm ${{ github.event.inputs.level }} + # run: cargo release ${{ github.event.inputs.level }} ${{ github.event.inputs.dry_run && '--no-push' || '' }} ${{ github.event.inputs.dry_run && '--no-publish' || '' }} --no-confirm --execute # TODO: Remove this after testing - run: cargo release major + run: cargo release major --no-push --no-publish --no-confirm --execute From 287460c37f336c8ca445cd9db9cffe5930808337 Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 23 Jul 2025 15:28:49 +0200 Subject: [PATCH 4/5] ci: configure git user for the release --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f2803e2..ec950a1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,10 @@ on: - minor - major +defaults: + run: + shell: bash + jobs: release: runs-on: ubuntu-latest @@ -35,6 +39,10 @@ jobs: run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev - name: Install cargo release run: cargo install --version 0.25.17 cargo-release + - name: Set git user + run: | + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com>" + git config --global user.name "${GITHUB_ACTOR}" - name: Run cargo release # TODO: Uncomment this after testing # run: cargo release ${{ github.event.inputs.level }} ${{ github.event.inputs.dry_run && '--no-push' || '' }} ${{ github.event.inputs.dry_run && '--no-publish' || '' }} --no-confirm --execute From d008963950f7afc55bfd705ea3763b57c41e0b53 Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 23 Jul 2025 15:47:44 +0200 Subject: [PATCH 5/5] ci: remove debug code --- .github/workflows/release.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec950a1e..0747db71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,8 @@ name: Release on: - # TODO: Remove this after testing - push: workflow_dispatch: inputs: - dry_run: - description: 'Dry run' - required: true - default: true - type: boolean level: description: 'Release level' required: true @@ -41,10 +34,9 @@ jobs: run: cargo install --version 0.25.17 cargo-release - name: Set git user run: | - git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com>" - git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_TRIGGERING_ACTOR}@users.noreply.github.com>" + git config --global user.name "${GITHUB_TRIGGERING_ACTOR}" - name: Run cargo release - # TODO: Uncomment this after testing - # run: cargo release ${{ github.event.inputs.level }} ${{ github.event.inputs.dry_run && '--no-push' || '' }} ${{ github.event.inputs.dry_run && '--no-publish' || '' }} --no-confirm --execute - # TODO: Remove this after testing - run: cargo release major --no-push --no-publish --no-confirm --execute + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo release ${{ github.event.inputs.level }} --no-confirm --execute