-
Notifications
You must be signed in to change notification settings - Fork 240
34 lines (31 loc) · 1.02 KB
/
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
33
34
# build binaries and add to release - see
# https://github.com/goreleaser/goreleaser-action
name: goreleaser
on:
workflow_dispatch:
jobs:
release:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
- name: Extract version
id: extract_version
run: |
CMD_VERSION="$(go run ./cmd/jsonnet --version | grep -oe 'v[0-9][0-9a-z.-]*$')" &&
printf "Extracted jsonnet version: %s\n" "${CMD_VERSION}" &&
printf "jsonnet_version='%s'\n" "${CMD_VERSION}" >> "${GITHUB_OUTPUT}"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
env:
PROPOSED_VERSION: "${{ steps.extract_version.outputs.jsonnet_version }}"
GITHUB_TOKEN: "${{ github.token }}"
with:
version: latest
args: release --clean