|
1 | 1 | name: Release |
2 | 2 | on: |
3 | 3 | push: |
4 | | - tags: |
5 | | - - 'v*' |
| 4 | + tags: |
| 5 | + - "v*" |
6 | 6 |
|
7 | 7 | jobs: |
8 | 8 | prepare-artifacts: |
9 | 9 | name: Prepare release artifacts |
10 | 10 | # if: github.ref == 'refs/heads/main' |
11 | | - runs-on: '${{ matrix.os }}' |
| 11 | + runs-on: "${{ matrix.os }}" |
12 | 12 | strategy: |
13 | 13 | matrix: |
14 | 14 | include: |
15 | 15 | - os: macos-latest |
16 | 16 | target: aarch64-apple-darwin |
17 | 17 | rust: stable |
18 | | - suffix: '' |
| 18 | + suffix: "" |
19 | 19 | archive_ext: zip |
20 | 20 | - os: macos-13 |
21 | 21 | target: x86_64-apple-darwin |
22 | 22 | rust: stable |
23 | | - suffix: '' |
| 23 | + suffix: "" |
24 | 24 | archive_ext: zip |
25 | 25 | - os: ubuntu-latest |
26 | 26 | target: x86_64-unknown-linux-gnu |
27 | 27 | rust: stable |
28 | | - suffix: '' |
| 28 | + suffix: "" |
29 | 29 | archive_ext: tar.xz |
30 | 30 | - os: windows-latest |
31 | 31 | target: x86_64-pc-windows-msvc |
32 | 32 | rust: stable |
33 | 33 | suffix: .exe |
34 | 34 | archive_ext: zip |
35 | 35 | steps: |
| 36 | + - name: Checkout |
| 37 | + uses: actions/checkout@v4 |
| 38 | + |
36 | 39 | - name: Rust install |
37 | 40 | uses: dtolnay/rust-toolchain@master |
38 | 41 | with: |
39 | 42 | toolchain: stable |
40 | 43 | components: rustfmt, clippy |
41 | 44 |
|
42 | | - - name: checkout |
43 | | - uses: actions/checkout@v4 |
44 | | - |
45 | 45 | - name: Cache crates from crates.io |
46 | 46 | uses: actions/cache@v4 |
47 | 47 | continue-on-error: false |
48 | 48 | with: |
49 | 49 | path: | |
50 | | - ~/.cargo/bin/ |
51 | | - ~/.cargo/registry/index/ |
52 | | - ~/.cargo/registry/cache/ |
53 | | - ~/.cargo/git/db/ |
54 | | - target/ |
55 | | - key: '${{ runner.os }}-${{ matrix.target }}-cargo-${{ matrix.rust }}-hash-${{ hashFiles(''**/Cargo.lock'') }}' |
| 50 | + ~/.cargo/bin/ |
| 51 | + ~/.cargo/registry/index/ |
| 52 | + ~/.cargo/registry/cache/ |
| 53 | + ~/.cargo/git/db/ |
| 54 | + target/ |
| 55 | + key: "${{ runner.os }}-${{ matrix.target }}-cargo-${{ matrix.rust }}-hash-${{ hashFiles('**/Cargo.lock') }}" |
56 | 56 |
|
57 | 57 | - name: Build Release |
58 | 58 | run: cargo build --release |
59 | 59 |
|
60 | 60 | - name: Compress to zip (macOS) |
61 | 61 | if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} |
62 | | - run: |
63 | | - zip -A ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} target/release/${{ github.event.repository.name }} |
| 62 | + run: zip -A ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} target/release/${{ github.event.repository.name }} |
64 | 63 |
|
65 | 64 | - name: Compress to zip (Windows) |
66 | 65 | if: ${{ matrix.os == 'windows-latest' }} |
67 | | - run: |
68 | | - Compress-Archive target/release/${{ github.event.repository.name }}${{ matrix.suffix }} ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} |
| 66 | + run: Compress-Archive target/release/${{ github.event.repository.name }}${{ matrix.suffix }} ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} |
69 | 67 |
|
70 | 68 | - name: Compress to tar.xz (Linux) |
71 | 69 | if: ${{ matrix.os == 'ubuntu-latest' }} |
72 | | - run: |
73 | | - tar Jcf ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} target/release/${{ github.event.repository.name }} |
| 70 | + run: tar Jcf ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} target/release/${{ github.event.repository.name }} |
74 | 71 |
|
75 | 72 | - name: List files |
76 | 73 | run: | |
@@ -104,7 +101,6 @@ jobs: |
104 | 101 | run: | |
105 | 102 | echo "tag-name=${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT} |
106 | 103 |
|
107 | | -
|
108 | 104 | - name: Download convco |
109 | 105 | run: | |
110 | 106 | git show-ref |
|
0 commit comments