-
Notifications
You must be signed in to change notification settings - Fork 99
40 lines (37 loc) · 1.14 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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*"
name: release
permissions:
contents: read
jobs:
build:
permissions:
contents: write
name: tag release
# This workflow is only of value to the metal3-io/cluster-api-provider-metal3 repository and
# would always fail in forks
if: github.repository == 'metal3-io/cluster-api-provider-metal3'
runs-on: ubuntu-latest
steps:
- name: Export RELEASE_TAG var
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: checkout code
uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # v2.6.0
with:
fetch-depth: 0
- name: Install go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: '1.19'
- name: Generate release artifacts and notes
run: |
make release
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
draft: true
files: out/*
body_path: releasenotes/${{ env.RELEASE_TAG }}.md