From 358eb3b09424fb234cad987dc2e8fb518bde8bf3 Mon Sep 17 00:00:00 2001 From: xypwn Date: Fri, 15 Mar 2024 16:26:50 +0100 Subject: [PATCH] Fix workflow --- .github/workflows/build-release.yml | 93 +++++++++++++++-------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 323af32..487fffa 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -1,47 +1,48 @@ -name: build - -on: - push: - branches: - - 'master' - tags: - - 'v*' - pull_request: - -jobs: - build-windows: - runs-on: windows-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 ./... - - uses: actions/upload-artifact@v4 - with: - name: filediver-win64 - path: filediver.exe - release: - runs-on: ubuntu-latest - needs: build-windows - steps: - - uses: actions/download-artifact@v4 - with: - name: filediver-win64 - - 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 +name: build + +on: + push: + branches: + - 'master' + tags: + - 'v*' + pull_request: + +jobs: + build-windows: + runs-on: windows-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-win64 + path: filediver.exe + release: + runs-on: ubuntu-latest + needs: build-windows + steps: + - uses: actions/download-artifact@v4 + with: + name: filediver-win64 + - 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 \ No newline at end of file