generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.27 KB
/
ci-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
name: CI Release Action
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: default
permissions:
contents: write
discussions: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
token: ${{ secrets.GITHUB_TOKEN }}
- name: release
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: ${{ vars.GITHUB_SHA }}
args: release --config .github/.goreleaser.yaml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
configuration: .github/changelog-config.json
outputFile: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
draft: true
generate_release_notes: false
body_path: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}