-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.15 KB
/
go-release.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
path: with_golang
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build
run: |
cd ./with_golang/
chmod +x ./build.sh
./build.sh autoradius.go
release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/tags/*'
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Artifact
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /main-repo/with-golang/autoradius
asset_name: autoradius
asset_content_type: application/octet-stream