-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.98 KB
/
release.yaml
File metadata and controls
63 lines (56 loc) · 1.98 KB
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
name: Release Tools
run-name: "release tools ${{ github.ref }}"
on:
push:
tags:
- "v*"
jobs:
release:
name: Publish Release
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: "1.20"
cache-dependency-path: go.sum
- name: Go Build
run: |
make release
make zip
- name: Install change log tools
run: go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
- name: Generate change log
id: changelog
run: |
tag=$(git tag --list --sort -version:refname | head -n 1)
git-chglog $tag > releaselog.md
- name: Preview change log
run: cat releaselog.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "bin/checksumfile,bin/darwin-amd64-devops-tools,bin/linux-amd64-devops-tools"
bodyFile: "releaselog.md"
token: ${{ secrets.DEVOPS_TOKEN }}
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: true
# prerelease: true
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# 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: bin/release.zip
# asset_name: release.zip
# asset_content_type: application/zip