-
Notifications
You must be signed in to change notification settings - Fork 472
51 lines (45 loc) · 1.24 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
name: "Build release artifacts"
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Get version from tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: echo "TRAVIS_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
- run: make release
- run: make dgoss-sha256 dcgoss-sha256 kgoss-sha256
- name: "Upload binary as artifact"
uses: actions/upload-artifact@v4
with:
retention-days: 5
if-no-files-found: error
name: build
path: |
release/*
extras/*/*goss
extras/*/*goss.sha256
attach-assets:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: ["build"]
runs-on: ubuntu-latest
steps:
- name: Fetch all binaries
uses: actions/download-artifact@v4
- name: Attach to release
uses: softprops/action-gh-release@v2
with:
files: build/**
fail_on_unmatched_files: true