-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.17 KB
/
publish.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
33
34
35
36
37
38
39
40
41
name: Publish
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
permissions: read-all
jobs:
github-release:
name: GitHub Release
runs-on: ubuntu-24.04
permissions:
contents: write # To create a GitHub Release
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Install Go
uses: actions/[email protected]
with:
go-version-file: go.mod
- name: Verify action checksums
env:
JOB: ${{ github.job }}
WORKFLOW: ${{ github.workflow_ref }}
run: |
WORKFLOW=$(echo "$WORKFLOW" | cut -d '@' -f 1 | cut -d '/' -f 3-5)
go run ./cmd/ghasum verify -cache /home/runner/work/_actions -no-evict -offline "$WORKFLOW:$JOB"
- name: Get release version
id: version
shell: bash
run: echo "value=${GITHUB_REF#refs/tags/}" >>"${GITHUB_OUTPUT}"
- name: Compile
run: go run tasks.go build-all
- name: Create GitHub release
uses: ncipollo/[email protected]
with:
tag: ${{ steps.version.outputs.value }}
name: Release ${{ steps.version.outputs.value }}
body: ${{ steps.version.outputs.value }}
artifacts: ./_compiled/*