Repository navigation
77 lines (70 loc) · 2.67 KB
/
Copy pathrw-perform-release-patch.yml
File metadata and controls
77 lines (70 loc) · 2.67 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: rw ~ Release ~ Perform release
on:
workflow_call:
inputs:
source-branch:
required: true
description: "Source branch to release from (release, rel/*)"
type: string
jobs:
publish-release:
uses: ./.github/workflows/rw-publish-release.yml
permissions:
contents: write
id-token: write
secrets: inherit
with:
bump: "patch"
source-branch: ${{ inputs.source-branch }}
prepare-variables:
runs-on: [ubuntu-latest]
needs: [publish-release]
outputs:
version: ${{ steps.set_variables.outputs.version }}
rel-branch: ${{ steps.set_variables.outputs.target-branch }}
short-version: ${{ steps.set_variables.outputs.short-version }}
permissions:
contents: read
steps:
- name: Set variables names for release aka rel branch name and short version
id: set_variables
run: |
echo "version $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
string=$VERSION
base="rel/${string%.*}"
echo "version $string converted to $base"
echo "target-branch=$base" >> $GITHUB_OUTPUT
short=${string%.*}
echo "version $string converted to $short"
echo "short-version=$short" >> $GITHUB_OUTPUT
env:
VERSION: ${{ needs.publish-release.outputs.version }}
add-release-tag:
needs: [publish-release,prepare-variables]
uses: ./.github/workflows/rw-git-create-tag.yml
permissions:
contents: write
with:
source-branch: ${{ inputs.source-branch }}
version: ${{ needs.prepare-variables.outputs.version }}
is-latest: ${{ needs.publish-release.outputs.is-latest}}
slack-notification:
runs-on: [ubuntu-latest]
needs: [add-release-tag, prepare-variables]
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.1
with:
token: ${{ secrets.TOKEN_GITHUB_YENKINS}}
- name: Set up message
id: set-up-message
run: |
echo "RELEASE_MESSAGE=Please add changelog entries from the ${SOURCE_BRANCH} to master branch manually" >> $GITHUB_ENV
env:
SOURCE_BRANCH: ${{ inputs.source-branch }}
- name: Notify to slack
uses: ./.github/actions/slack/send-notification
with:
message: ${{ env.RELEASE_MESSAGE }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}