-
Notifications
You must be signed in to change notification settings - Fork 17
61 lines (59 loc) · 1.95 KB
/
release.yaml
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
name: release
on:
push:
tags:
- '*'
jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build
run: make build
- name: version
run: echo "::set-output name=version::$(./bin/azblogfilter --version)"
id: version
- name: build artifacts
run: make build-linux && make build-windows && make build-darwin
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/azblogfilter.linux-amd64.tar.gz
asset_name: azblogfilter.linux-amd64.tar.gz
asset_content_type: application/gzip
- name: upload darwin artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/azblogfilter.darwin-amd64.tar.gz
asset_name: azblogfilter.darwin-amd64.tar.gz
asset_content_type: application/gzip
- name: upload windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/azblogfilter.windows-amd64.zip
asset_name: azblogfilter.windows-amd64.zip
asset_content_type: application/zip