-
Notifications
You must be signed in to change notification settings - Fork 63
49 lines (44 loc) · 1.47 KB
/
Copy pathrelease.yml
File metadata and controls
49 lines (44 loc) · 1.47 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
name: 'Release'
on:
workflow_dispatch:
inputs:
version:
description: 'Version to be released'
required: true
type: string
base-branch:
description: 'The branch to release from.'
type: choice
options:
- main
- '8.x'
default: 'main'
permissions: {}
jobs:
verify-version:
name: 'Verify prepare_release PR was merged'
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.base-branch }}
- name: Verify PUPPETVERSION matches release version
env:
RELEASE_VERSION: ${{ inputs.version }}
run: |
puppetversion=$(ruby -e "require_relative 'lib/puppet/version'; puts Puppet::PUPPETVERSION")
if [ "$puppetversion" != "$RELEASE_VERSION" ]; then
echo "::error::PUPPETVERSION is '$puppetversion' but expected '$RELEASE_VERSION'. Has the prepare_release PR been merged?"
exit 1
fi
echo "PUPPETVERSION '$puppetversion' matches release version"
release:
needs: verify-version
uses: OpenVoxProject/shared-actions/.github/workflows/release.yml@main
with:
version: ${{ inputs.version }}
base-branch: ${{ inputs.base-branch }}
secrets:
github_pat: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }}
ssh_private_key: ${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }}