Skip to content

Commit 0b42da8

Browse files
committed
Bump actions
1 parent 45ee4d4 commit 0b42da8

File tree

2 files changed

+38
-19
lines changed

2 files changed

+38
-19
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
tags:
66
- "v*"
7+
pull_request:
8+
branches: [main]
79

810
jobs:
911
build:
@@ -13,30 +15,48 @@ jobs:
1315
- target: x86_64-unknown-linux-gnu
1416
os: ubuntu-latest
1517
- target: x86_64-pc-windows-gnu
16-
os: ubuntu-latest
18+
os: windows-latest
1719
extension: .exe
1820
- target: x86_64-apple-darwin
1921
os: macos-latest
2022

2123
runs-on: ${{ matrix.os }}
2224

2325
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions-rs/toolchain@v1
26+
- uses: actions/checkout@v4
27+
- uses: dtolnay/rust-toolchain@stable
2628
with:
2729
toolchain: stable
28-
- uses: actions-rs/cargo@v1
29-
with:
30-
command: build
31-
args: --release --target=${{ matrix.target }}
32-
use-cross: true
33-
- uses: actions/upload-artifact@v1
30+
targets: ${{ matrix.target }}
31+
- run: cargo build --release --target=${{ matrix.target }}
32+
- uses: actions/upload-artifact@v4
3433
with:
3534
name: build-${{ matrix.target }}
3635
path: target/${{ matrix.target }}/release/split-test${{ matrix.extension }}
3736

38-
create-release:
37+
test-artifact:
38+
strategy:
39+
matrix:
40+
include:
41+
- target: x86_64-unknown-linux-gnu
42+
os: ubuntu-latest
43+
- target: x86_64-pc-windows-gnu
44+
os: windows-latest
45+
extension: .exe
46+
- target: x86_64-apple-darwin
47+
os: macos-latest
48+
runs-on: ${{ matrix.os }}
3949
needs: [build]
50+
steps:
51+
- uses: actions/download-artifact@v4
52+
with:
53+
name: build-${{ matrix.target }}
54+
- run: chmod +x ./split-test${{ matrix.extension }}
55+
- run: ./split-test${{ matrix.extension }} --help
56+
57+
create-release:
58+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
59+
needs: [test-artifact]
4060
runs-on: ubuntu-latest
4161
steps:
4262
- id: create-release
@@ -50,12 +70,13 @@ jobs:
5070
prerelease: false
5171
- run: |
5272
echo '${{ steps.create-release.outputs.upload_url }}' > release_upload_url.txt
53-
- uses: actions/upload-artifact@v1
73+
- uses: actions/upload-artifact@v4
5474
with:
5575
name: create-release
5676
path: release_upload_url.txt
5777

5878
upload-release:
79+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
5980
strategy:
6081
matrix:
6182
target:
@@ -67,13 +88,13 @@ jobs:
6788
needs: [create-release]
6889
runs-on: ubuntu-latest
6990
steps:
70-
- uses: actions/download-artifact@v1
91+
- uses: actions/download-artifact@v4
7192
with:
7293
name: create-release
7394
- id: upload-url
7495
run: |
75-
echo "::set-output name=url::$(cat create-release/release_upload_url.txt)"
76-
- uses: actions/download-artifact@v1
96+
echo "url=$(cat create-release/release_upload_url.txt)" >> $GITHUB_OUTPUT
97+
- uses: actions/download-artifact@v4
7798
with:
7899
name: build-${{ matrix.target }}
79100
- run: find .

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions-rs/toolchain@v1
14+
- uses: actions/checkout@v4
15+
- uses: dtolnay/rust-toolchain@stable
1616
with:
1717
toolchain: stable
18-
- uses: actions-rs/cargo@v1
19-
with:
20-
command: test
18+
- run: cargo test

0 commit comments

Comments
 (0)