Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
H1JK committed Feb 15, 2024
1 parent 474a473 commit a99a813
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "^1.20"
check-latest: true

- name: Cross Compile
run: |
mkdir bin
Expand All @@ -32,8 +32,8 @@ jobs:
GOOS=darwin GOARCH=arm64 go build -o ./bin/geo-macos-arm64 ./cmd/geo
GOOS=windows GOARCH=amd64 go build -o ./bin/geo-windows-amd64.exe ./cmd/geo
GOOS=windows GOARCH=arm64 go build -o ./bin/geo-windows-arm64.exe ./cmd/geo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ success() }}
with:
name: artifact
Expand All @@ -42,32 +42,32 @@ jobs:
Upload-Prerelease:
permissions: write-all
if: ${{ github.ref_type == 'branch' && !startsWith(github.event_name, 'pull_request') }}
needs: [build]
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: bin/

- name: Display structure of downloaded files
run: ls -R
working-directory: bin

- name: Delete current release assets
uses: 8Mi-Tech/delete-release-assets-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: Prerelease-${{ github.ref_name }}
deleteOnlyFromDrafts: false

- name: Tag Repo
uses: richardsimko/update-tag@v1.0.6
uses: richardsimko/update-tag@v1
with:
tag_name: Prerelease-${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Prerelease
uses: softprops/action-gh-release@v1
if: ${{ success() }}
Expand All @@ -81,18 +81,18 @@ jobs:
Upload-Release:
permissions: write-all
if: ${{ github.ref_type=='tag' }}
needs: [build]
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: bin/

- name: Display structure of downloaded files
run: ls -R
working-directory: bin

- name: Upload Release
uses: softprops/action-gh-release@v1
if: ${{ success() }}
Expand Down

0 comments on commit a99a813

Please sign in to comment.