-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1001 Bytes
/
release-package.yml
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
name: Publish
on:
pull_request:
branches:
- main
types: [closed]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: "1.16"
- run: go version
- run: GOARCH=amd64 GOOS=linux go build -ldflags "-s -w" .
- run: zip -9 -r application-linux-amd64.zip gam repo.json
- run: rm gam
- run: GOARCH=arm64 GOOS=linux go build -ldflags "-s -w" .
- run: zip -9 -r application-linux-arm64.zip gam repo.json
- run: echo "RELEASE_VERSION=`git tag | sort -V | tail -1`" >> $GITHUB_ENV
- uses: "marvinpinto/action-automatic-releases@latest"
with:
title: Release ${{ env.RELEASE_VERSION }}
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: ${{ env.RELEASE_VERSION }}
files: |
application-linux-amd64.zip
application-linux-arm64.zip