forked from p3lim/pixie
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 939 Bytes
/
Copy pathrelease.yaml
File metadata and controls
38 lines (32 loc) · 939 Bytes
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
name: Create release
on:
push:
tags:
- '**'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Build
uses: p3lim/pixie@master
with:
go_version: '1.16.9'
- name: Get tag
run: |
VERSION="${GITHUB_REF#refs/tags/}"
VERSION_MAJOR="${VERSION%%\.*}"
VERSION_MINOR="${VERSION%.*}"
echo "::set-output name=tag::$VERSION"
echo "::set-output name=major::$VERSION_MAJOR"
echo "::set-output name=minor::$VERSION_MINOR"
id: tag
- name: Build binaries
env:
CGO_ENABLED: 0
run: go build -ldflags="-X 'main.Version=${{ steps.tag.outputs.tag }}'" -o bin/pixie ./cmd/pixie
- name: Trim changelog
run: sed -ni '1p;2,/^###/{/^###/q;p;}' CHANGELOG.md
- uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
files: bin/pixie