Skip to content

feat: scoped issue (#666) #3099

feat: scoped issue (#666)

feat: scoped issue (#666) #3099

Workflow file for this run

name: Release
on:
push:
branches:
- master
jobs:
release:
name: releaser
runs-on: ubuntu-latest
strategy:
matrix:
golang: [1.18.x]
steps:
-
name: Checkout
uses: actions/checkout@v3.0.2
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Run Semantic Release
id: semantic
uses: docker://ghcr.io/codfish/semantic-release-action:v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up Go
if: steps.semantic.outputs.new-release-published == 'true'
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.golang }}
-
name: Cache Go modules
if: steps.semantic.outputs.new-release-published == 'true'
uses: actions/cache@v3.0.6
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.golang }}-v1-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ matrix.golang }}-v1-
-
name: Run GoReleaser
if: steps.semantic.outputs.new-release-published == 'true'
uses: goreleaser/goreleaser-action@v2.6.1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Register version on pkg.go.dev
if: steps.semantic.outputs.new-release-published == 'true'
run: |
package=$(cat go.mod | grep ^module | awk '{print $2}')
version=v${{ steps.semantic.outputs.release-version }}
url=https://proxy.golang.org/${package}/@v/${version}.info
set -x +e
curl -i $url