Skip to content

Merge pull request #7 from inovex/dependabot/go_modules/golang.org/x/… #49

Merge pull request #7 from inovex/dependabot/go_modules/golang.org/x/…

Merge pull request #7 from inovex/dependabot/go_modules/golang.org/x/… #49

name: Build, Test and Release Binaries
on:
push
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run Tests
run: go test ./...
release:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run Goreleaser
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean