Skip to content

update library version and go version #220

update library version and go version

update library version and go version #220

Workflow file for this run

on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
jobs:
build-and-release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: '1.21'
- uses: actions/cache@v3.2.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
go test ./...
env:
CGO_ENABLED: 0
- name: Login to docker.io registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: goodwithtech
password: ${{ secrets.GH_PAT }}
-
name: Run GoReleaser
if: success() && startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
-
name: Clear
if: always() && startsWith(github.ref, 'refs/tags/v')
run: |
rm -f ${HOME}/.docker/config.json