Skip to content

Commit

Permalink
Upload release assets automatically as well
Browse files Browse the repository at this point in the history
  • Loading branch information
anka-213 committed Jul 22, 2021
1 parent e1b9692 commit 3daf334
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/build-binary-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,29 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: gf-${{ github.sha }}-${{ matrix.os }}
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
path: dist/gf_*.deb
if-no-files-found: error

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/gf_*.deb
asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
# asset_content_type: application/gzip

# ---

macos:
name: Build macOS package
runs-on: macos-10.15
strategy:
matrix:
ghc: ["8.6.5"]
cabal: ["2.4"]
os: ["macos-10.15"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -98,15 +108,24 @@ jobs:
path: dist/gf-*.pkg
if-no-files-found: error

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/gf_*.pkg
asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb

# ---

windows:
name: Build Windows package
runs-on: windows-2019
strategy:
matrix:
ghc: ["8.6.5"]
cabal: ["2.4"]
os: ["windows-2019"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -185,3 +204,11 @@ jobs:
name: gf-${{ github.sha }}-windows
path: C:\tmp-dist\*
if-no-files-found: error

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: C:\tmp-dist\*
asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}

0 comments on commit 3daf334

Please sign in to comment.