Skip to content

Commit cb51630

Browse files
committed
fix: run actions only on tags
1 parent 8c8bdaf commit cb51630

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

.github/workflows/release-python.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# This file is partially autogenerated by maturin v1.9.5
2-
name: CI
2+
name: Python CI
33
on:
44
push:
5-
branches:
6-
- main
75
tags:
86
- "v*"
97
pull_request:
@@ -37,6 +35,14 @@ jobs:
3735
args: --profile release-lto --out dist --find-interpreter --manifest-path ./python/Cargo.toml
3836
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
3937
manylinux: auto
38+
before-script-linux: |
39+
if command -v yum &> /dev/null; then
40+
yum install -y perl-IPC-Cmd perl-Time-Piece
41+
elif command -v dnf &> /dev/null; then
42+
dnf install -y perl-IPC-Cmd perl-Time-Piece
43+
elif command -v apt-get &> /dev/null; then
44+
apt-get update && apt-get install -y libmodule-build-perl libtime-piece-perl
45+
fi
4046
- name: Upload wheels
4147
uses: actions/upload-artifact@v4
4248
with:
@@ -106,7 +112,7 @@ jobs:
106112
strategy:
107113
matrix:
108114
platform:
109-
- runner: macos-13
115+
- runner: macos-15
110116
target: x86_64
111117
- runner: macos-14
112118
target: aarch64

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
name: CI
1+
name: Rust CI
22
on:
33
push:
4-
branches:
5-
- main
64
tags:
75
- "v*"
86
pull_request:
@@ -50,6 +48,16 @@ jobs:
5048
if [ "${{ github.ref_name }}" != "v$version" ]; then
5149
exit 1
5250
fi
51+
- name: Setup ubuntu deps
52+
if: contains(matrix.platform.runs-on, 'ubuntu')
53+
run: |
54+
if command -v yum &> /dev/null; then
55+
sudo yum install -y perl-IPC-Cmd perl-Time-Piece
56+
elif command -v dnf &> /dev/null; then
57+
sudo dnf install -y perl-IPC-Cmd perl-Time-Piece
58+
elif command -v apt-get &> /dev/null; then
59+
sudo apt-get update && sudo apt-get install -y libmodule-build-perl libtime-piece-perl
60+
fi
5361
- run: rustup target add ${{ matrix.platform.target }}
5462
- name: Build cli
5563
run: cargo build --profile release-lto --bin apk-info --target ${{ matrix.platform.target }}

0 commit comments

Comments
 (0)