Skip to content

Commit a7b6fc9

Browse files
authored
fix: release pipeline (#215)
Currently, `release-plz` runs into issues when trying to determine the next version of the `sol_rpc_canister` crate. This is because the `sol_rpc_canister` crate is a binary crate and hence not published on [crates.io](crates.io). However, since a release tag exists for the crate, `release-plz` tries to download the latest release from [crates.io](crates.io) and fails. See [this failed release pipeline run](https://github.com/dfinity/sol-rpc-canister/actions/runs/17233112571) for example. I've opened [a PR](release-plz/release-plz#2357) to fix this issue in the upstream release-plz repository, and updated the release pipeline here to build the release-plz GitHub action from source to include those changes. This is a temporary solution until the changes are merged in the upstream repository. The release pipeline runs again successfully when using the patched release-plz GitHub action (see [this run](https://github.com/dfinity/sol-rpc-canister/actions/runs/17321578196)).
1 parent 37729ba commit a7b6fc9

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@ jobs:
6767
- name: "Install parse-changelog"
6868
uses: taiki-e/install-action@parse-changelog
6969

70+
- name: "Install release-plz from fork"
71+
run: |
72+
git clone https://github.com/lpahlavi/release-plz.git /tmp/release-plz-fork
73+
cd /tmp/release-plz-fork
74+
git checkout 9b511999ed04cc5070fe5efcd5481b6b2cc035c1
75+
cargo +1.88.0 install --path crates/release_plz
76+
7077
- name: "Run release-plz"
71-
id: release-plz
72-
uses: release-plz/action@8724d33cd97b8295051102e2e19ca592962238f5 # v0.5.108
73-
with:
74-
command: release
78+
run: release-plz release --git-token ${{ secrets.GITHUB_TOKEN }}
7579
env:
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7780
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
7881

7982
- name: "Generate Github release body"

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
22+
- name: Install release-plz from fork
23+
run: |
24+
git clone https://github.com/lpahlavi/release-plz.git /tmp/release-plz-fork
25+
cd /tmp/release-plz-fork
26+
git checkout 9b511999ed04cc5070fe5efcd5481b6b2cc035c1
27+
cargo +1.88.0 install --path crates/release_plz
2228
- name: Run release-plz
23-
uses: release-plz/action@8724d33cd97b8295051102e2e19ca592962238f5 # v0.5.108
24-
with:
25-
command: release-pr
29+
run: release-plz release-pr --git-token ${{ secrets.GITHUB_TOKEN }}
2630
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2831
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)