From 75ceefdcb5e9d9db2597f542040fc7be0e48808a Mon Sep 17 00:00:00 2001 From: xypwn Date: Fri, 15 Mar 2024 16:45:34 +0100 Subject: [PATCH] Add linux release workflow --- .github/workflows/build-release.yml | 37 +++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index e28983f..b751b9e 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -25,13 +25,36 @@ 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: @@ -39,6 +62,7 @@ jobs: with: tag_name: ${{ github.run_number }} release_name: Release ${{ github.run_number }} + - uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -46,4 +70,13 @@ jobs: 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 \ No newline at end of file + 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 \ No newline at end of file