generated from moul/golang-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (31 loc) · 834 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Release
on:
push:
branches:
- master
jobs:
release:
name: releaser
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3.6.0
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Run Semantic Release
id: semantic
uses: codfish/semantic-release-action@v2.2.0
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