diff --git a/.github/workflows/publish-awstf.yaml b/.github/workflows/publish-awstf.yaml new file mode 100644 index 000000000..77a3f720a --- /dev/null +++ b/.github/workflows/publish-awstf.yaml @@ -0,0 +1,34 @@ +name: publish-awstf + +on: + push: + # run only against tags + tags: + - '*' + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.22.7 + - uses: goreleaser/goreleaser-action@v4 + with: + # either 'goreleaser' (default) or 'goreleaser-pro': + distribution: goreleaser + version: '~> v1' + args: release --clean -f .goreleaser.tf.yaml + workdir: cloud/aws + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-gcptf.yaml b/.github/workflows/publish-gcptf.yaml new file mode 100644 index 000000000..e5b20f239 --- /dev/null +++ b/.github/workflows/publish-gcptf.yaml @@ -0,0 +1,34 @@ +name: publish-gcptf + +on: + push: + # run only against tags + tags: + - '*' + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.22.7 + - uses: goreleaser/goreleaser-action@v4 + with: + # either 'goreleaser' (default) or 'goreleaser-pro': + distribution: goreleaser + args: release --clean -f .goreleaser.tf.yaml + workdir: cloud/gcp + version: '~> v1' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/cloud/aws/.goreleaser.tf.yaml b/cloud/aws/.goreleaser.tf.yaml new file mode 100644 index 000000000..6e6a45aac --- /dev/null +++ b/cloud/aws/.goreleaser.tf.yaml @@ -0,0 +1,40 @@ +--- +project_name: awstf +release: + prerelease: auto +before: + hooks: + - go work sync + - make predeploybin +builds: + - id: awstf + env: + - CGO_ENABLED=0 + binary: aws + main: ./cmd/deploytf + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 +archives: + - name_template: >- + {{ .ProjectName }}_ + {{- tolower .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ tolower .Arch }}{{ end }} + id: awstf + builds: + - awstf + format_overrides: + - goos: windows + format: zip +checksum: + name_template: "awstf_checksums.txt" +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + skip: true diff --git a/cloud/aws/.goreleaser.yaml b/cloud/aws/.goreleaser.yaml index c5dae86f7..bb9166318 100644 --- a/cloud/aws/.goreleaser.yaml +++ b/cloud/aws/.goreleaser.yaml @@ -19,18 +19,6 @@ builds: goarch: - amd64 - arm64 - - id: awstf - env: - - CGO_ENABLED=0 - binary: aws - main: ./cmd/deploytf - goos: - - linux - - windows - - darwin - goarch: - - amd64 - - arm64 archives: - name_template: >- {{ .ProjectName }}_ @@ -43,18 +31,6 @@ archives: format_overrides: - goos: windows format: zip - - name_template: >- - {{ .ProjectName }}tf_ - {{- tolower .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ tolower .Arch }}{{ end }} - id: awstf - builds: - - awstf - format_overrides: - - goos: windows - format: zip checksum: name_template: "aws_checksums.txt" snapshot: diff --git a/cloud/gcp/.goreleaser.tf.yaml b/cloud/gcp/.goreleaser.tf.yaml new file mode 100644 index 000000000..3b3d2ae30 --- /dev/null +++ b/cloud/gcp/.goreleaser.tf.yaml @@ -0,0 +1,40 @@ +--- +project_name: gcptf +release: + prerelease: auto +before: + hooks: + - go work sync + - make predeploybin +builds: + - id: gcptf + env: + - CGO_ENABLED=0 + binary: gcp + main: ./cmd/deploytf + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 +archives: + - name_template: >- + {{ .ProjectName }}_ + {{- tolower .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ tolower .Arch }}{{ end }} + id: gcptf + builds: + - gcptf + format_overrides: + - goos: windows + format: zip +checksum: + name_template: "gcptf_checksums.txt" +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + skip: true diff --git a/cloud/gcp/.goreleaser.yaml b/cloud/gcp/.goreleaser.yaml index f1ef6ec3a..5861df51a 100644 --- a/cloud/gcp/.goreleaser.yaml +++ b/cloud/gcp/.goreleaser.yaml @@ -19,18 +19,6 @@ builds: goarch: - amd64 - arm64 - - id: gcptf - env: - - CGO_ENABLED=0 - binary: gcp - main: ./cmd/deploytf - goos: - - linux - - windows - - darwin - goarch: - - amd64 - - arm64 archives: - name_template: >- {{ .ProjectName }}_ @@ -42,18 +30,6 @@ archives: format_overrides: - goos: windows format: zip - - name_template: >- - {{ .ProjectName }}tf_ - {{- tolower .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ tolower .Arch }}{{ end }} - id: gcptf - builds: - - gcptf - format_overrides: - - goos: windows - format: zip checksum: name_template: "gcp_checksums.txt" snapshot: