-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (97 loc) · 4.57 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: create release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: set tag env
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: install go
uses: actions/setup-go@v3
with:
go-version: '1.18'
check-latest: true
- name: Build Artifacts
run: make distclean build-reproducible
- name: generate release note
run: go run ./contrib/generate_release_note/main.go ${{ env.VERSION }} ./artifacts/build_report ./CHANGELOG.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: ./releasenote
draft: true
prerelease: false
- name: Upload build_report
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/build_report
asset_name: build_report
asset_content_type: application/file
- name: Upload darwin-amd64 artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-darwin-amd64
asset_name: gaiad-${{ env.VERSION }}-darwin-amd64
asset_content_type: application/binary
- name: Upload darwin-arm64 artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-darwin-arm64
asset_name: gaiad-${{ env.VERSION }}-darwin-arm64
asset_content_type: application/binary
- name: Upload linux-amd64 artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-linux-amd64
asset_name: gaiad-${{ env.VERSION }}-linux-amd64
asset_content_type: application/binary
- name: Upload linux-arm64 artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-linux-arm64
asset_name: gaiad-${{ env.VERSION }}-linux-arm64
asset_content_type: application/binary
- name: Upload windows-amd64 artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-windows-amd64.exe
asset_name: gaiad-${{ env.VERSION }}-windows-amd64.exe
asset_content_type: application/binary
- name: Upload compression
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/gaiad-${{ env.VERSION }}.tar.gz
asset_name: gaiad-${{ env.RELEASE_VERSION }}.tar.gz
asset_content_type: application/gzip