-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (48 loc) · 1.39 KB
/
release.yml
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
name: Release workflow
on:
workflow_dispatch:
inputs:
tag_name:
description: "Version to produce"
required: true
draft:
description: "Draft"
required: true
type: boolean
default: true
prerelease:
description: "Pre-release"
required: true
type: boolean
default: false
generate_release_notes:
description: "Generate release notes"
required: true
type: boolean
default: true
jobs:
check-manifest:
name: Check the Manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check the manifest version
if: ${{ inputs.tag_name != '' }}
run: |
sudo apt-get install -y jq
version=$(jq -r '.version' manifest.json)
tag_name=${{ inputs.tag_name }}
tag_name_without_v=${tag_name#v}
if [[ $version != $tag_name_without_v ]]; then
echo "The manifest version is not equal to the tag version"
exit 1
fi
build-release:
needs: check-manifest
uses: ./.github/workflows/build.yml
with:
tag_name: ${{ github.event.inputs.tag_name }}
draft: ${{ github.event.inputs.draft }}
prerelease: ${{ github.event.inputs.prerelease }}
generate_release_notes: ${{ github.event.inputs.generate_release_notes }}
secrets: inherit