automatically upload windows artifact on Release Tag creation
This commit is contained in:
@@ -11,6 +11,8 @@ permissions: read-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows-artifacts:
|
windows-artifacts:
|
||||||
|
permissions:
|
||||||
|
contents: write # to fetch code and upload artifacts
|
||||||
# see https://ariya.io/2020/07/on-github-actions-with-msys2
|
# see https://ariya.io/2020/07/on-github-actions-with-msys2
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
# see https://github.com/msys2/setup-msys2
|
# see https://github.com/msys2/setup-msys2
|
||||||
@@ -27,7 +29,7 @@ jobs:
|
|||||||
- uses: msys2/setup-msys2@61f9e5e925871ba6c9e3e8da24ede83ea27fa91f # tag=v2.27.0
|
- uses: msys2/setup-msys2@61f9e5e925871ba6c9e3e8da24ede83ea27fa91f # tag=v2.27.0
|
||||||
with:
|
with:
|
||||||
msystem: ${{ matrix.msystem }}
|
msystem: ${{ matrix.msystem }}
|
||||||
install: make zlib git mingw-w64-${{matrix.env}}-gcc
|
install: make zlib p7zip git mingw-w64-${{matrix.env}}-gcc
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
- name: display versions
|
- name: display versions
|
||||||
@@ -49,10 +51,24 @@ jobs:
|
|||||||
./lib/dll/example/build_package.bat || exit 1
|
./lib/dll/example/build_package.bat || exit 1
|
||||||
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
|
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
|
||||||
|
|
||||||
- name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip
|
- name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip for manual inspection
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1
|
||||||
with:
|
with:
|
||||||
compression-level: 9 # maximum compression
|
compression-level: 9 # maximum compression
|
||||||
if-no-files-found: error # defaults to `warn`
|
if-no-files-found: error # defaults to `warn`
|
||||||
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
|
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
|
||||||
name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}
|
name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}
|
||||||
|
|
||||||
|
- name: Package artifact for upload
|
||||||
|
run: |
|
||||||
|
7z a -tzip -mx9 "$(cygpath -u '${{ github.workspace }}/zstd-${{ github.ref_name }}-${{ matrix.ziparch }}.zip')" "$(cygpath -u '${{ github.workspace }}/zstd-${{ github.ref_name }}-${{ matrix.ziparch }}')"
|
||||||
|
|
||||||
|
- name: Upload release asset
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh release upload "${{ github.ref_name }}" "$env:GITHUB_WORKSPACE/zstd-${{ github.ref_name }}-${{ matrix.ziparch }}.zip" --clobber
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user