Skip to content

Commit

Permalink
use actions/cache for passing zips to release job
Browse files Browse the repository at this point in the history
  • Loading branch information
ILW8 committed Apr 8, 2024
1 parent ba56616 commit cfd5aa1
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,31 @@ jobs:
- name: Create publish package
run: dotnet publish -c Release -r ${{matrix.os}} --self-contained -warnaserror osu.Desktop.slnf

- name: zip files
run: zip -r ${{matrix.os}}.zip osu.Desktop/bin/Release/net8.0/${{matrix.os}}

- uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}
path: osu.Desktop/bin/Release/net8.0/${{matrix.os}}

- name: zip release
run: zip -r ${{matrix.os}}.zip osu.Desktop/bin/Release/net8.0/${{matrix.os}}

- name: cache release .zip
uses: actions/cache/save@v4
with:
path: ${{matrix.os}}.zip
key: ${{ matrix.os }}-${{ github.sha }}

release:
name: Release
needs: build
runs-on: Ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
- name: restore release .zip
uses: actions/cache/restore@v4
with:
path: ${{matrix.os}}.zip
key: ${{ matrix.os }}-${{ github.sha }}

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit cfd5aa1

Please sign in to comment.