Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Update github action release
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilenko, Maksim (contracted) authored and Bilenko, Maksim (contracted) committed Aug 20, 2020
1 parent 7beddcc commit 86262a4
Showing 1 changed file with 41 additions and 194 deletions.
235 changes: 41 additions & 194 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,198 +1,45 @@
on:
release:
types: [created]
name: Build Release
jobs:
release-linux-386:
name: release linux/386
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: "386"
GOOS: linux
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v -o ${GOOS}_${GOARCH}-terraform-provider-aws-synthetics_${GITHUB_REF##*/} .

- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: '*terraform-provider-aws-synthetics*'

release-linux-amd64:
name: release linux/amd64
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: "amd64"
GOOS: linux
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v -o ${GOOS}_${GOARCH}-terraform-provider-aws-synthetics_${GITHUB_REF##*/} .

- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: '*terraform-provider-aws-synthetics*'
release-linux-arm:
name: release linux/386
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: "arm"
GOOS: linux
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
name: goreleaser

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v -o ${GOOS}_${GOARCH}-terraform-provider-aws-synthetics_${GITHUB_REF##*/} .

- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: '*terraform-provider-aws-synthetics*'
release-linux-arm64:
name: release linux/arm64
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: "arm64"
GOOS: linux
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v -o ${GOOS}_${GOARCH}-terraform-provider-aws-synthetics_${GITHUB_REF##*/} .

- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: '*terraform-provider-aws-synthetics*'
release-darwin-amd64:
name: release darwin/amd64
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: "amd64"
GOOS: darwin
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v -o ${GOOS}_${GOARCH}-terraform-provider-aws-synthetics_${GITHUB_REF##*/} .
on:
push:
tags:
- '*'

- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: '*terraform-provider-aws-synthetics*'
release-windows-amd64:
name: release windows/amd64
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: "amd64"
GOOS: windows
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v -o ${GOOS}_${GOARCH}-terraform-provider-aws-synthetics_${GITHUB_REF##*/}.exe .

- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: '*terraform-provider-aws-synthetics*'
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

0 comments on commit 86262a4

Please sign in to comment.