Skip to content

Commit df0c38e

Browse files
committed
ci: enable artifact upload
1 parent 74e401a commit df0c38e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/dist.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ jobs:
6363
if: matrix.target == 'i686-unknown-linux-musl'
6464
run: sudo apt-get install gcc-multilib g++-multilib libc6-dev-i386
6565
- run: cargo build --target ${{ matrix.target }} --release
66+
- name: Archive
67+
shell: bash
68+
run: |
69+
ver=${GITHUB_REF/refs\/*\//}
70+
archive="dist/cargo-nfpm-$ver-${{ matrix.target }}"
71+
mkdir -p dist
72+
73+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
74+
7z a "${archive}.zip" target/${{ matrix.target }}/release/cargo-nfpm.exe
75+
else
76+
tar czf "${archive}.tar.gz" -C target/${{ matrix.target }}/release cargo-nfpm
77+
fi
78+
79+
ls -lah dist/*
6680
- name: Upload artifacts
6781
uses: actions/upload-artifact@v4
6882
with:

0 commit comments

Comments
 (0)