Skip to content

Merge pull request #17 from rootphantomer/master #15

Merge pull request #17 from rootphantomer/master

Merge pull request #17 from rootphantomer/master #15

name: go_build_test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
env:
TEST_TAG: latest-go-build-test
jobs:
release:
name: go-build-test-jobs
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup docker-compose
uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '1.29.2'
- name: Force Delete Release
uses: dev-drprasad/delete-tag-and-release@master
with:
delete_release: true
tag_name: ${{ env.TEST_TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create/Update tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.TEST_TAG }}
message: "go build test"
force_push_tag: true
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TEST_TAG }}
release_name: ${{ env.TEST_TAG }}
draft: false
prerelease: false
publish:
needs: release
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [ linux, windows, darwin ]
goarch: [ "386", amd64, arm64 ]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@master
with:
release_tag : ${{ env.TEST_TAG }}
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.19.linux-amd64.tar.gz"
project_path: "."
binary_name: "quake"
extra_files: README.md
clean:
name: clean release
needs: publish
runs-on: ubuntu-latest
steps:
- name: Force Delete Release
uses: dev-drprasad/delete-tag-and-release@master
with:
delete_release: true
tag_name: ${{ env.TEST_TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}