Skip to content

Release

Release #30

Workflow file for this run

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"
- 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 }}