generated from unoplat/base-project-structure
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.55 KB
/
main-pr-merge-workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Go merge workflow
on:
pull_request:
types: [closed]
branches:
- main
jobs:
merge_job:
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: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: google-github-actions/release-please-action@v4
id: release_action_plan
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.GITHUB_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: go
path: code/base-project/image-scan
- uses: wangyoucao577/go-release-action@v1
if: steps.release_action_plan.outputs.releases_created == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://go.dev/dl/go1.22.0.linux-amd64.tar.gz"
project_path: "code/base-project/image-scan"
binary_name: "image-scan"
release_tag: ${{ github.ref }}