-
-
Notifications
You must be signed in to change notification settings - Fork 25
50 lines (49 loc) · 1.71 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
46
47
48
49
50
name: release
on:
push:
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Unshallow
run: git fetch --prune --unshallow
- uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
cache: true
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3
with:
version: latest
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Extract new version
id: version
run: |
cd dist/terraform-provider-authentik_linux_amd64_v1/
VERSION=$(./$(ls) -version)
echo "##[set-output name=version]$VERSION"
- name: Create a Sentry.io release
uses: getsentry/action-release@b5b5a8ce7540bd7f67594177d52464a9bb543fb8
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: authentik-security-inc
SENTRY_PROJECT: terraform-provider-authentik
with:
version: terraform-provider-authentik@${{ steps.version.outputs.version }}