Skip to content

Commit cc73810

Browse files
committed
Merge branch 'main' into b-int64-validators
2 parents 92f4a78 + 96df4c3 commit cc73810

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
archives:
2+
- files:
3+
# Ensure only built binary is archived
4+
- 'none*'
5+
format: zip
6+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
7+
before:
8+
hooks:
9+
- 'go mod download'
10+
builds:
11+
# Check and build binary for 32-bit architecture (FreeBSD/ARM)
12+
- id: 32-bit-arch
13+
# Binary naming only required for Terraform CLI 0.12
14+
binary: '{{ .ProjectName }}_v{{ .Version }}_x5'
15+
env:
16+
- CGO_ENABLED=0
17+
flags:
18+
- -trimpath
19+
goos:
20+
- freebsd
21+
goarch:
22+
- arm
23+
ldflags:
24+
- -s -w -X version.ProviderVersion={{.Version}}
25+
mod_timestamp: '{{ .CommitTimestamp }}'
26+
snapshot:
27+
name_template: "{{ .Tag }}-next"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Continuous integration handling for GoReleaser
2+
name: GoReleaser CI
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
paths:
10+
- .github/workflows/goreleaser-ci.yml
11+
- .goreleaser.yml
12+
- .go-version
13+
- go.sum
14+
- main.go
15+
- internal/**
16+
- tools/**
17+
18+
jobs:
19+
changes:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
goreleaser: ${{ steps.filter.outputs.goreleaser }}
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: dorny/paths-filter@v2
26+
id: filter
27+
with:
28+
filters: |
29+
goreleaser:
30+
- '.github/workflows/goreleaser-ci.yml'
31+
- '.goreleaser.yml'
32+
check:
33+
needs: changes
34+
if: ${{ needs.changes.outputs.goreleaser == 'true' }}
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: actions/setup-go@v3
39+
with:
40+
go-version-file: go.mod
41+
- uses: actions/cache@v2
42+
continue-on-error: true
43+
timeout-minutes: 2
44+
with:
45+
path: ~/go/pkg/mod
46+
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
47+
- name: goreleaser check
48+
uses: goreleaser/goreleaser-action@v2
49+
with:
50+
args: check
51+
build-32-bit:
52+
# Run a single compiler check for 32-bit architecture (FreeBSD/ARM)
53+
# Ref: https://github.com/hashicorp/terraform-provider-awscc/issues/533
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v3
57+
- uses: actions/setup-go@v3
58+
with:
59+
go-version-file: go.mod
60+
- uses: actions/cache@v2
61+
continue-on-error: true
62+
timeout-minutes: 2
63+
with:
64+
path: ~/go/pkg/mod
65+
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
66+
- name: goreleaser build
67+
uses: goreleaser/goreleaser-action@v2
68+
with:
69+
args: build --config .github/goreleaser-cross-compiler-test.yml --id 32-bit-arch --snapshot

0 commit comments

Comments
 (0)