Skip to content

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
priya-kinthali authored Nov 24, 2023
1 parent 435e6e7 commit ca619cb
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
# 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: Build and Publish Golang App

on:
push:
branches: [ "main" ]
branches: [ main ]
pull_request:
branches: [ "main" ]
branches: [ main ]

jobs:

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: priya-kinthali/setup-go@poc-build

- name: Set up Go
uses: actions/setup-go@v4

with:
go-version: '1.20'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...


- 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

0 comments on commit ca619cb

Please sign in to comment.