Skip to content

Commit

Permalink
fix: build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegiwg committed Jun 26, 2024
1 parent fcb8c2b commit 5508878
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,27 @@ on:
jobs:
build-and-release:
runs-on: ubuntu-latest

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

- name: Set up Go
uses: actions/setup-go@v2
- name: Set Up
uses: actions/setup-go@v4
with:
go-version: 1.22

- name: Build and test
run: |
go build -v
go test -v
- name: Build
run: go build -o bin/tt
id: build

- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
draft: true
prerelease: false

- name: Upload binary
uses: actions/upload-release-asset@v1
tag_name: ${{ github.ref }}
files: |
bin/tt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tt
asset_name: tt-${{ github.ref }}.tar.gz
asset_content_type: application/gzip
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 5508878

Please sign in to comment.