11name : Release
22on :
33 push :
4- tags :
5- - ' v* '
4+ tags :
5+ - " v* "
66
77jobs :
88 prepare-artifacts :
99 name : Prepare release artifacts
1010 # if: github.ref == 'refs/heads/main'
11- runs-on : ' ${{ matrix.os }}'
11+ runs-on : " ${{ matrix.os }}"
1212 strategy :
1313 matrix :
1414 include :
1515 - os : macos-latest
1616 target : aarch64-apple-darwin
1717 rust : stable
18- suffix : ' '
18+ suffix : " "
1919 archive_ext : zip
2020 - os : macos-13
2121 target : x86_64-apple-darwin
2222 rust : stable
23- suffix : ' '
23+ suffix : " "
2424 archive_ext : zip
2525 - os : ubuntu-latest
2626 target : x86_64-unknown-linux-gnu
2727 rust : stable
28- suffix : ' '
28+ suffix : " "
2929 archive_ext : tar.xz
3030 - os : windows-latest
3131 target : x86_64-pc-windows-msvc
@@ -39,38 +39,37 @@ jobs:
3939 toolchain : stable
4040 components : rustfmt, clippy
4141
42- - name : checkout
42+ - name : Checkout
4343 uses : actions/checkout@v4
44+ with :
45+ fetch-depth : 1
4446
4547 - name : Cache crates from crates.io
4648 uses : actions/cache@v4
4749 continue-on-error : false
4850 with :
4951 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') }}"
5658
5759 - name : Build Release
5860 run : cargo build --release
5961
6062 - name : Compress to zip (macOS)
6163 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 }}
6465
6566 - name : Compress to zip (Windows)
6667 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 }}
6969
7070 - name : Compress to tar.xz (Linux)
7171 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 }}
7473
7574 - name : List files
7675 run : |
@@ -104,7 +103,6 @@ jobs:
104103 run : |
105104 echo "tag-name=${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT}
106105
107-
108106 - name : Download convco
109107 run : |
110108 git show-ref
0 commit comments