From ff7d8be9ad0e4177ba91130c7933959c93e99c13 Mon Sep 17 00:00:00 2001 From: kingcdavid Date: Thu, 4 Apr 2024 13:08:42 +0100 Subject: [PATCH] Feature/fix build action (#7) * fixing build and publish action --- .github/workflows/build.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67d39ab..b525b73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Build and Publish on: workflow_dispatch jobs: - test: + build_and_publish: strategy: matrix: go-version: [1.21.x] @@ -14,19 +14,28 @@ jobs: uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} + - name: Checkout code uses: actions/checkout@v2 + - name: Build Binaries shell: bash run: ./scripts/build-all-arch.sh + - name: Set version - run: VER=$(cat version.txt) - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 + run: | + VER=$(cat version.txt) + echo "VERSION=$VER" >> $GITHUB_ENV + + - name: Create release + id: create_release + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: release/atlas-* - tag: $VER - overwrite: false - file_glob: true + tag_name: ${{ env.VERSION }} + name: Release ${{ env.VERSION }} + files: release/atlas-* + draft: true + prerelease: false \ No newline at end of file