Skip to content

Updated libraries (#22) #39

Updated libraries (#22)

Updated libraries (#22) #39

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.23
# - name: Install dependencies
# run: |
# go version
# go get -u golang.org/x/lint/golint
- name: Build
run: go build -v ./...
# - name: Test With Coverage
# run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
# - name: Upload coverage to Codecov
# run: bash <(curl -s https://codecov.io/bash)
tag:
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.23
- name: Tag and Deploy
run: |
git fetch --prune --unshallow
CURV=$(git describe --tags `git rev-list --tags --max-count=1`)
IFS='.' read -ra VR <<< "$CURV"
INC=`expr ${VR[2]} + 1`
FV="${VR[0]}.${VR[1]}.$INC"
eval "git tag $FV && git push origin $FV"
eval "GOPROXY=proxy.golang.org go list -m github.com/aurc/loggo@$FV"
shell: bash
release:
needs: tag
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.23
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_LOGGO_GITHUB_TOKEN }}