-
Notifications
You must be signed in to change notification settings - Fork 2
119 lines (102 loc) · 3.6 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Release
on:
workflow_dispatch:
inputs:
release_name:
description: Release name
required: true
env:
INSTANCE: 'Writerside/zpc'
ARTIFACT: 'webHelpZPC2-all.zip'
DOCKER_VERSION: '233.14938'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Doxygen
run: |
wget https://github.com/doxygen/doxygen/releases/download/Release_1_10_0/doxygen-1.10.0.linux.bin.tar.gz
tar xzvf doxygen-1.10.0.linux.bin.tar.gz
cd doxygen-1.10.0
sudo make install
- name: Get last release information
id: get_last_release
run: |
LAST_RELEASE=$(git describe --tags --abbrev=0)
echo "::set-output name=tag::$LAST_RELEASE"
- name: Get commit messages since last release
id: get_commit_messages
run: |
git fetch --tags
git log --pretty=format:"%s" ${{ steps.get_last_release.outputs.tag }}..HEAD > commit_messages.txt
- name: Create release description
id: create_release_description
run: |
while IFS= read -r line; do
case $line in
*chore:*) echo "**$line**" >> release_description.txt;;
*fix:*) echo "**$line**" >> release_description.txt;;
*docs:*) echo "**$line**" >> release_description.txt;;
*feat:*) echo "**$line**" >> release_description.txt;;
*) echo "$line" >> release_description.txt;;
esac
done < commit_messages.txt
- name: Generate PHPDocs
run: |
git pull --rebase
doxygen
git config --global user.email "[email protected]"
git config --global user.name "AdministrationBot"
- name: Publish PHPDocs
run: |
git add .
git commit -m "docs: Update PHPDocs"
git status
git push https://github.com/RedstonePfalz/zitadel-php-client.git main --force
- name: Build classic docs
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}
- name: Unzip generated files
run: |
mkdir -p docs/classic
unzip -o artifacts/${{ env.ARTIFACT }} -d docs/classic
- name: Publish classic docs
run: |
git add .
git commit -m "docs: Update classic docs"
git push https://github.com/RedstonePfalz/zitadel-php-client.git main --force
- name: Get release description
id: read_release_description
run: |
cat release_description.txt
echo "::set-output name=description::$(cat release_description.txt)"
- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
token: ${{ secrets.BOT_TOKEN }}
outputFile: "CHANGELOG.md"
commitMode: true
fetchReviewers: true
fetchViaCommits: true
configuration: "changelog_config.json"
- name: "Upload to Git"
run: |
git add .
git commit -m "chore: Add changelog"
git push https://github.com/RedstonePfalz/zitadel-php-client.git main --force
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.BOT_TOKEN }}
body: ${{steps.build_changelog.outputs.changelog}}
tag_name: ${{ github.event.inputs.release_name }}
name: ${{ github.event.inputs.release_name }}