Skip to content

Commit 2a7e5fc

Browse files
authored
ci: fix release issue (#248)
1 parent fa8091e commit 2a7e5fc

3 files changed

Lines changed: 32 additions & 12 deletions

File tree

.github/workflows/release-go-binding.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,20 @@ jobs:
116116
ref: ${{ needs.validate.outputs.source_sha }}
117117

118118
- name: Install Rust toolchain
119-
uses: dtolnay/rust-toolchain@stable
119+
run: |
120+
rustup update stable
121+
rustup default stable
120122
121123
- name: Cache Rust build outputs
122-
uses: Swatinem/rust-cache@v2
124+
uses: actions/cache@v4
125+
with:
126+
path: |
127+
~/.cargo/bin/
128+
~/.cargo/registry/index/
129+
~/.cargo/registry/cache/
130+
~/.cargo/git/db/
131+
target/
132+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
123133

124134
- name: Install zstd on Linux
125135
if: runner.os == 'Linux'
@@ -197,12 +207,16 @@ jobs:
197207
git push origin "refs/tags/$TAG"
198208
199209
- name: Create GitHub release
200-
uses: softprops/action-gh-release@v2
201-
with:
202-
tag_name: ${{ needs.validate.outputs.tag }}
203-
generate_release_notes: true
204-
files: |
205-
bindings/go/libpaimon_c.linux.amd64.so.zst
206-
bindings/go/libpaimon_c.linux.arm64.so.zst
207-
bindings/go/libpaimon_c.darwin.amd64.dylib.zst
208-
bindings/go/libpaimon_c.darwin.arm64.dylib.zst
210+
env:
211+
TAG: ${{ needs.validate.outputs.tag }}
212+
VERSION: ${{ needs.validate.outputs.version }}
213+
GH_TOKEN: ${{ github.token }}
214+
working-directory: bindings/go
215+
run: |
216+
gh release create "$TAG" \
217+
--title "Release Go binding $VERSION" \
218+
--generate-notes \
219+
libpaimon_c.linux.amd64.so.zst \
220+
libpaimon_c.linux.arm64.so.zst \
221+
libpaimon_c.darwin.amd64.dylib.zst \
222+
libpaimon_c.darwin.arm64.dylib.zst

.github/workflows/release-rust.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ jobs:
4848
- uses: actions/checkout@v6
4949

5050
- name: Setup Rust toolchain
51-
uses: dtolnay/rust-toolchain@stable
51+
run: |
52+
rustup update stable
53+
rustup default stable
5254
5355
- name: Dry run
5456
run: cargo publish -p ${{ matrix.package }} --all-features --dry-run

.github/workflows/release_python_binding.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
working-directory: bindings/python
4949
command: sdist
5050
args: -o dist
51+
before-script-linux: |
52+
yum install -y openssl-devel 2>/dev/null || apt-get update && apt-get install -y libssl-dev
5153
5254
- name: Upload sdist
5355
uses: actions/upload-artifact@v4
@@ -75,6 +77,8 @@ jobs:
7577
command: build
7678
args: --release -o dist
7779
manylinux: ${{ matrix.manylinux || 'auto' }}
80+
before-script-linux: |
81+
yum install -y openssl-devel 2>/dev/null || apt-get update && apt-get install -y libssl-dev
7882
7983
- name: Upload wheels
8084
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)