-
Notifications
You must be signed in to change notification settings - Fork 176
58 lines (49 loc) · 1.67 KB
/
releases.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
52
53
54
55
56
57
58
# Copyright (C) 2021 ScyllaDB
name: Releases
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+'
# GitHub actions suck for re-triggering on tag changes, so we allow also manual trigger.
# Also useful for easily re-triggering release notes updates when PR title is fixed.
workflow_dispatch:
inputs:
tag:
description: 'Tag for publishing a release, like `v1.3.0`. The old release must be deleted before this job.'
required: true
env:
go_version: '1.22'
defaults:
run:
shell: bash
jobs:
release-notes:
name: Publish release notes
runs-on: ubuntu-22.04
steps:
- name: Determine current tag
run: |
set -euExo pipefail
shopt -s inherit_errexit
if [[ -n '${{ github.event.inputs.tag }}' ]]; then
current_tag='${{ github.event.inputs.tag }}'
else
current_tag="${GITHUB_REF#refs/*/}"
fi
echo "current_tag=${current_tag}" | tee -a ${GITHUB_ENV}
- uses: actions/checkout@v3
with:
path: ${{ github.workspace }}/go/src/github.com/scylladb/scylla-operator
fetch-depth: 0
- name: Generate and publish release notes
uses: ./go/src/github.com/scylladb/scylla-operator/.github/actions/release-notes
with:
githubRepository: ${{ github.repository }}
githubRef: ${{ env.current_tag }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
goVersion: ${{ env.go_version }}
genReleaseNotesVersionRef: ${{ env.current_tag }}
containerImageName: docker.io/scylladb/scylla-operator