-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.54 KB
/
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
52
53
54
---
name: Build-Release
"on":
push:
tags:
- v*
permissions: read-all
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get build-release dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -o /tmp/gocate -v ./cmd/gocate
- name: Build info
run: |
file /tmp/gocate
# TODO both of these actions are deprecated
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha || null }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Release gocate
id: release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /tmp/gocate
asset_name: gocate
asset_content_type: application/octet-stream