Skip to content

Update go.yml

Update go.yml #2

Workflow file for this run

name: Build and Publish Golang App
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: priya-kinthali/setup-go@poc-build
with:
go-version: '1.20'
- name: Build the application
run: go build -v ./...
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: golang-app
path: ./
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: golang-app
path: ./
- name: Publish
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist