Skip to content

chore: use self-host CI #13

chore: use self-host CI

chore: use self-host CI #13

Workflow file for this run

name: CI
env:
GO_VERSION: 1.20.x
on:
push:
workflow_dispatch:
jobs:
release:
# runs-on: ubuntu-latest
runs-on:
group: Default
# if: startsWith(github.ref, 'ref/tags/v')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Get go version
id: go-version
run: echo "::set-output name=version::$(go env GOVERSION)"
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ steps.go-version.outputs.version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ env.CACHE_VERSION }}-${{ runner.os }}-go
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}