|
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 | + with: |
| 39 | + fetch-depth: 1 |
| 40 | + |
36 | 41 | - name: Rust install |
37 | 42 | uses: dtolnay/rust-toolchain@master |
38 | 43 | with: |
39 | 44 | toolchain: stable |
40 | 45 | components: rustfmt, clippy |
41 | 46 |
|
42 | | - - name: checkout |
43 | | - uses: actions/checkout@v4 |
44 | | - |
45 | 47 | - name: Cache crates from crates.io |
46 | 48 | uses: actions/cache@v4 |
47 | 49 | continue-on-error: false |
48 | 50 | with: |
49 | 51 | 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'') }}' |
| 52 | + ~/.cargo/bin/ |
| 53 | + ~/.cargo/registry/index/ |
| 54 | + ~/.cargo/registry/cache/ |
| 55 | + ~/.cargo/git/db/ |
| 56 | + target/ |
| 57 | + key: "${{ runner.os }}-${{ matrix.target }}-cargo-${{ matrix.rust }}-hash-${{ hashFiles('**/Cargo.lock') }}" |
56 | 58 |
|
57 | 59 | - name: Build Release |
58 | 60 | run: cargo build --release |
59 | 61 |
|
60 | 62 | - name: Compress to zip (macOS) |
61 | 63 | 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 }} |
| 64 | + run: zip -A ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} target/release/${{ github.event.repository.name }} |
64 | 65 |
|
65 | 66 | - name: Compress to zip (Windows) |
66 | 67 | 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 }} |
| 68 | + run: Compress-Archive target/release/${{ github.event.repository.name }}${{ matrix.suffix }} ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} |
69 | 69 |
|
70 | 70 | - name: Compress to tar.xz (Linux) |
71 | 71 | 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 }} |
| 72 | + run: tar Jcf ${{ github.event.repository.name }}-${{ matrix.target }}.${{ matrix.archive_ext }} target/release/${{ github.event.repository.name }} |
74 | 73 |
|
75 | 74 | - name: List files |
76 | 75 | run: | |
@@ -104,7 +103,6 @@ jobs: |
104 | 103 | run: | |
105 | 104 | echo "tag-name=${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT} |
106 | 105 |
|
107 | | -
|
108 | 106 | - name: Download convco |
109 | 107 | run: | |
110 | 108 | git show-ref |
|
0 commit comments