Skip to content

Commit e2caaad

Browse files
authored
Merge branch 'main' into marcin/prod-4173-improve-terraform-provider-docs
2 parents d5743f5 + 39496d2 commit e2caaad

File tree

2 files changed

+77
-13
lines changed

2 files changed

+77
-13
lines changed

.github/workflows/release.yml

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,98 @@ on:
66
permissions:
77
contents: write
88
jobs:
9+
prepare:
10+
name: Prepare
11+
strategy:
12+
matrix:
13+
os: [ ubuntu-latest, macos-latest, windows-latest ]
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v5
17+
with:
18+
fetch-depth: 0
19+
- uses: actions/setup-go@v6
20+
with:
21+
go-version-file: 'go.mod'
22+
cache: true
23+
- shell: bash
24+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
25+
- uses: actions/cache@v4
26+
if: matrix.os == 'ubuntu-latest'
27+
with:
28+
path: dist/linux
29+
key: linux-${{ env.sha_short }}${{ env.flags }}
30+
- uses: actions/cache@v4
31+
if: matrix.os == 'macos-latest'
32+
with:
33+
path: dist/darwin
34+
key: darwin-${{ env.sha_short }}${{ env.flags }}
35+
- uses: actions/cache@v4
36+
if: matrix.os == 'windows-latest'
37+
with:
38+
path: dist/windows
39+
key: windows-${{ env.sha_short }}${{ env.flags }}
40+
enableCrossOsArchive: true
41+
- name: Import GPG key
42+
uses: crazy-max/[email protected]
43+
id: import_gpg
44+
with:
45+
gpg_private_key: ${{ secrets.PLURAL_GPG_PRIVATE_KEY }}
46+
passphrase: ${{ secrets.PLURAL_GPG_KEY_PASSWORD }}
47+
- uses: goreleaser/goreleaser-action@v6
48+
with:
49+
distribution: goreleaser-pro
50+
version: '~> v2'
51+
args: release --clean --split
52+
env:
53+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
956
release:
1057
name: Release
1158
runs-on: ubuntu-latest
59+
env:
60+
DOCKER_CLI_EXPERIMENTAL: "enabled"
61+
needs: prepare
1262
steps:
1363
- uses: jlumbroso/[email protected]
1464
with:
1565
tool-cache: false
16-
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
66+
- uses: actions/checkout@v5
1767
with:
1868
fetch-depth: 0
19-
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
69+
- uses: actions/setup-go@v6
2070
with:
2171
go-version-file: 'go.mod'
2272
cache: true
73+
- shell: bash
74+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
75+
- uses: actions/cache@v4
76+
with:
77+
path: dist/linux
78+
key: linux-${{ env.sha_short }}${{ env.flags }}
79+
- uses: actions/cache@v4
80+
with:
81+
path: dist/darwin
82+
key: darwin-${{ env.sha_short }}${{ env.flags }}
83+
- uses: actions/cache@v4
84+
with:
85+
path: dist/windows
86+
key: windows-${{ env.sha_short }}${{ env.flags }}
87+
enableCrossOsArchive: true
2388
- name: Import GPG key
24-
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
89+
uses: crazy-max/ghaction-import-gpg@v6.3.0
2590
id: import_gpg
2691
with:
2792
gpg_private_key: ${{ secrets.PLURAL_GPG_PRIVATE_KEY }}
2893
passphrase: ${{ secrets.PLURAL_GPG_KEY_PASSWORD }}
29-
- name: Run GoReleaser
30-
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
94+
- uses: goreleaser/goreleaser-action@v6
95+
if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit
3196
with:
32-
args: release --clean
97+
distribution: goreleaser-pro
98+
version: '~> v2'
99+
args: continue --merge
33100
env:
101+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
34102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35103
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Visit https://goreleaser.com for documentation on how to customize this
2-
# behavior.
1+
version: 2
32
before:
43
hooks:
5-
# this is just an example and not a requirement for provider building/publishing
64
- go mod tidy
75
builds:
86
- env:
@@ -30,7 +28,7 @@ builds:
3028
goarch: '386'
3129
binary: '{{ .ProjectName }}_v{{ .Version }}'
3230
archives:
33-
- format: zip
31+
- formats: [ 'zip' ]
3432
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3533
checksum:
3634
extra_files:
@@ -54,7 +52,5 @@ release:
5452
extra_files:
5553
- glob: 'terraform-registry-manifest.json'
5654
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
57-
# If you want to manually examine the release before its live, uncomment this line:
58-
# draft: true
5955
changelog:
60-
skip: true
56+
disable: true

0 commit comments

Comments
 (0)