Skip to content

Commit

Permalink
upload splitted artifact to release (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
aoirint authored Sep 24, 2021
1 parent 8446d76 commit 39b5777
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,47 @@ jobs:
name: ${{ matrix.artifact_name }}
path: |
artifact/
upload-to-release:
if: github.event.release.tag_name != ''
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
strategy:
matrix:
artifact_name:
- linux-cpu
- linux-nvidia
- windows-cpu
- windows-nvidia
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
p7zip-full
- name: Download and extract artifact
uses: actions/download-artifact@v2
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}/

- name: Rearchive and split artifact
run: |
# compressed to artifact.7z.001, artifact.7z.002, ...
7z -r -v1g a "${{ matrix.artifact_name }}.7z" "${{ matrix.artifact_name }}/"
# Output splitted archive list
ls ${{ matrix.artifact_name }}.7z.* > archives.txt
mv archives.txt "${{ matrix.artifact_name }}.7z.txt"
- name: Upload splitted archives to Release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }} # == github.event.release.tag_name
file_glob: true
file: ${{ matrix.artifact_name }}.7z.*

0 comments on commit 39b5777

Please sign in to comment.