fix(ci): include version in release tarball filenames
tarballs are now named mcl-{version}-{target}.tar.gz instead of
mcl-{target}.tar.gz so each release has unique filenames. this
prevents package manager caches from serving stale downloads.
This commit is contained in:
1 parent
035bae98d9
commit
b43ed3e807
2 files changed
+13
-6
No files matched your search
@@ -55,23 +55,30 @@ jobs:
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
|
||||
- name: get version
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
version=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: package (unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czf ../../../mcl-${{ matrix.target }}.tar.gz ${{ matrix.artifact }}
|
||||
tar czf ../../../mcl-${{ steps.version.outputs.version }}-${{ matrix.target }}.tar.gz ${{ matrix.artifact }}
|
||||
|
||||
- name: package (windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
Compress-Archive -Path ${{ matrix.artifact }} -DestinationPath ../../../mcl-${{ matrix.target }}.zip
|
||||
Compress-Archive -Path ${{ matrix.artifact }} -DestinationPath ../../../mcl-${{ steps.version.outputs.version }}-${{ matrix.target }}.zip
|
||||
|
||||
- name: upload artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: mcl-${{ matrix.target }}
|
||||
path: mcl-${{ matrix.target }}.*
|
||||
name: mcl-${{ steps.version.outputs.version }}-${{ matrix.target }}
|
||||
path: mcl-${{ steps.version.outputs.version }}-${{ matrix.target }}.*
|
||||
|
||||
release:
|
||||
needs: build
|
||||
|
||||
Reference in new issue
Block a user