Skip to content

Commit f3314ac

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

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-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: 22 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:
@@ -38,10 +36,12 @@ jobs:
3836
target: aarch64-apple-darwin
3937
steps:
4038
- uses: actions/checkout@v4
39+
4140
- name: Install Rust toolchain
4241
uses: dtolnay/rust-toolchain@stable
4342
with:
4443
toolchain: stable
44+
4545
- name: Check version
4646
shell: bash
4747
run: |
@@ -50,9 +50,27 @@ jobs:
5050
if [ "${{ github.ref_name }}" != "v$version" ]; then
5151
exit 1
5252
fi
53+
54+
- name: Install musl tools
55+
if: matrix.platform.target == 'x86_64-unknown-linux-musl'
56+
run: sudo apt-get update && sudo apt-get install -y musl-tools
57+
58+
- name: Install perl deps
59+
if: contains(matrix.platform.runs-on, 'ubuntu')
60+
run: |
61+
if command -v yum &> /dev/null; then
62+
sudo yum install -y perl-IPC-Cmd perl-Time-Piece
63+
elif command -v dnf &> /dev/null; then
64+
sudo dnf install -y perl-IPC-Cmd perl-Time-Piece
65+
elif command -v apt-get &> /dev/null; then
66+
sudo apt-get update && sudo apt-get install -y libmodule-build-perl libtime-piece-perl
67+
fi
68+
5369
- run: rustup target add ${{ matrix.platform.target }}
70+
5471
- name: Build cli
5572
run: cargo build --profile release-lto --bin apk-info --target ${{ matrix.platform.target }}
73+
5674
- name: Build archive
5775
shell: bash
5876
run: |
@@ -63,6 +81,7 @@ jobs:
6381
else
6482
tar czvf $name.gz -C target/${{ matrix.platform.target }}/release-lto/apk-info
6583
fi
84+
6685
- name: Upload artifacts
6786
uses: actions/upload-artifact@v4
6887
with:

0 commit comments

Comments
 (0)