-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (41 loc) · 1.29 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
35
36
37
38
39
40
41
42
43
44
45
name: Release
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
check-latest: true
cache: true
- id: build-variables
run: |
echo "go-version=$(go version | cut -d' ' -f3)" >> $GITHUB_OUTPUT
echo "go-platform=$(go version | cut -d' ' -f4)" >> $GITHUB_OUTPUT
echo "build-date=$(date)" >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GO_VERSION: ${{ steps.build-variables.outputs.go-version }}
GO_PLATFORM: ${{ steps.build-variables.outputs.go-platform }}
BUILD_DATE: ${{ steps.build-variables.outputs.build-date }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANALYTICS_APPLICATION_ID: ${{ vars.ANALYTICS_APPLICATION_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_HOST: ${{ vars.POSTHOG_API_HOST }}