-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from Umaaz/master
change(builds): change builds to use goreleaser
- Loading branch information
Showing
8 changed files
with
144 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,39 @@ | ||
name: Release | ||
name: goreleaser | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
VERSION: ${{ github.ref_name }} | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
go-version: 1.20.x | ||
fetch-depth: 0 | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Vendor | ||
run: go mod vendor | ||
|
||
- name: Build | ||
run: make deep | ||
|
||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/get-release@v1.3.2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Upload release binary | ||
uses: actions/upload-release-asset@v1.0.2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./bin/linux/deep-amd64 | ||
asset_name: Linux amd64 | ||
asset_content_type: application/octet-stream | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build image | ||
run: make docker-deep-ci | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push Image | ||
run: | | ||
docker tag intergral/deep intergral/deep:$VERSION | ||
docker tag intergral/deep intergral/deep:latest | ||
docker push intergral/deep:$VERSION | ||
docker push intergral/deep:latest | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution | ||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters