Skip to content

Commit

Permalink
Add linux release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xypwn committed Mar 15, 2024
1 parent 46b62e3 commit 75ceefd
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,58 @@ jobs:
with:
name: filediver-win64
path: filediver.exe

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.20.0
cache: true
- run: go test -v ./...
- run: go build
- uses: actions/upload-artifact@v4
with:
name: filediver-linux64
path: filediver

release:
runs-on: ubuntu-latest
needs: build-windows
needs: [build-windows, build-linux]
steps:
- uses: actions/download-artifact@v4
with:
name: filediver-win64

- uses: actions/download-artifact@v4
with:
name: filediver-linux64

- uses: actions/create-release@v1
id: create-new-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./filediver.exe
asset_name: filediver-win64.exe
asset_content_type: application/vnd.microsoft.portable-executable
asset_content_type: application/vnd.microsoft.portable-executable

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./filediver
asset_name: filediver-linux64
asset_content_type: application/octet-stream

0 comments on commit 75ceefd

Please sign in to comment.