Skip to content

Commit

Permalink
build: add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex-82 committed Jul 14, 2024
1 parent 6e8c805 commit 889b156
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go
name: Go build

on:
push:
Expand All @@ -21,7 +18,7 @@ jobs:
with:
go-version: '1.22.5'

- name: Build
- name: build
run: go build -o todocheck -v ./app/...

# - name: Test
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Go project

on:
push:
tags:
- "*" # trigger only if push new tag version

jobs:
build:
name: Go Releaser Build
runs-on: ubuntu-latest

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.5'
id: go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: release --rm-dist
workdir: ./app/
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}

0 comments on commit 889b156

Please sign in to comment.