-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (64 loc) · 1.83 KB
/
release.yaml
File metadata and controls
73 lines (64 loc) · 1.83 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
name: Release
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: 'Choice of SemVer release type [patch, minor, major]'
required: true
default: 'PATCH'
options:
- 'MAJOR'
- 'MINOR'
- 'PATCH'
commit:
description: 'The commit hash which you want to tag with the version number and release'
default: 'b4bf8372bed0a3fb458295c32be78752bcb3b315'
required: true
deploy:
description: "Should deploy to Pages?"
default: false
type: boolean
jobs:
release:
runs-on: ubuntu-latest
name: Release
# required to create a Release
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# the complete History is needed to tag older Commits
- name: Version
id: version
uses: ./.github/actions/semVers
with:
release_type: ${{ inputs.release_type }}
is_release: true
- name: Tag Commit
run: |
git config user.name liuuner
git config user.email liun@tappolet.ch
git tag ${{ steps.version.outputs.next_version }} ${{ inputs.commit }}
git push origin ${{ steps.version.outputs.next_version }}
- name: Create GitHub-Release
id: createRelease
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.next_version }}
generate_release_notes: true
token: ${{ secrets.PAT }}
build_and_deploy:
name: Build and Deploy
if: inputs.deploy
needs: release
uses: ./.github/workflows/build_and_deploy.yaml
permissions:
contents: read
pages: write
id-token: write
with:
ref: ${{ inputs.commit }}