You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Make a release with a build artifact and release binary
2
+
# when we create a tag
3
+
name: Release
4
+
on:
5
+
push:
6
+
tags:
7
+
- 'v*'
8
+
9
+
jobs:
10
+
build:
11
+
name: Upload Release Asset
12
+
runs-on: [windows-latest]
13
+
steps:
14
+
15
+
- name: Set up Go 1.13
16
+
uses: actions/setup-go@v1
17
+
with:
18
+
go-version: 1.13
19
+
id: go
20
+
21
+
- name: Check out code into the Go module directory
22
+
uses: actions/checkout@v1
23
+
24
+
- name: Get dependencies
25
+
run: |
26
+
go get -v -t -d ./...
27
+
28
+
- run: mkdir -p build/go
29
+
30
+
- name: Build
31
+
run: |
32
+
go build -v -o build/go/terraform-provider-windns.exe
33
+
34
+
- name: Create Release from Tag
35
+
id: create_release
36
+
uses: actions/create-release@v1.0.0
37
+
env:
38
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39
+
with:
40
+
tag_name: ${{ github.ref }}
41
+
release_name: Release ${{ github.ref }}
42
+
draft: false
43
+
prerelease: false
44
+
45
+
- name: Upload Release Asset
46
+
id: upload-release-asset
47
+
uses: actions/upload-release-asset@v1.0.1
48
+
env:
49
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50
+
with:
51
+
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
0 commit comments