-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 972 Bytes
/
release.yaml
File metadata and controls
36 lines (36 loc) · 972 Bytes
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
name: Create Versioned Release
on:
workflow_dispatch:
inputs:
level:
description: 'The semver level of the release'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
fetch-depth: 0
- run: |
NEW_VERSION=$(scripts/calculate-semver.sh "${{ github.event.inputs.level }}")
echo "Calculated new version: $NEW_VERSION"
git tag "$NEW_VERSION"
echo "Pushing new tag: $NEW_VERSION"
git push --tags
publish:
uses: ./.github/workflows/publish.yaml
needs: release
permissions:
contents: write
secrets:
GOVUK_CI_GITHUB_API_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}