-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.73 KB
/
release.yaml
File metadata and controls
53 lines (49 loc) · 1.73 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
name: release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
permissions:
contents: write # Allow to create a release.
env:
# Mirantis registry configuration for manifest generation
PROD_REGISTRY: ghcr.io/mirantis
IMAGE_NAME: cluster-api-provider-openstack
jobs:
build:
name: create draft release
runs-on: ubuntu-latest
steps:
- name: Set env
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag=v5.0.0
with:
fetch-depth: 0
- name: Calculate go version
run: echo "go_version=$(make go-version)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5.0
with:
go-version: ${{ env.go_version }}
- name: generate release artifacts
run: |
make release
env:
REGISTRY: ${{ env.PROD_REGISTRY }}
PROD_REGISTRY: ${{ env.PROD_REGISTRY }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
- name: generate release notes
# Ignore failures for release-notes generation so they could still get
# generated manually before publishing.
run: |
make generate-release-notes || echo "Failed to generate release notes" >> _releasenotes/${{ env.RELEASE_TAG }}.md
env:
GH_TOKEN: ${{ github.token }}
- name: Release
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # tag=v2.3.2
with:
draft: true
files: out/*
body_path: _releasenotes/${{ env.RELEASE_TAG }}.md