mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
6b0bbe794d
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.19.0 to 5.20.0. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.19.0...v5.20.0) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
name: Create Prepare-Release PR
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
create_pr:
|
|
name: "Create Pump Version PR"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Update Draft
|
|
uses: release-drafter/release-drafter@v5.20.0
|
|
id: draft
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
|
|
|
- name: Setup YQ
|
|
uses: chrisdickinson/setup-yq@latest
|
|
with:
|
|
yq-version: v4.9.1
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Parse Changlog
|
|
run: |
|
|
pip install emoji
|
|
cat << EOF >> cl.md
|
|
${{ steps.draft.outputs.body }}
|
|
EOF
|
|
TAG="${{ steps.draft.outputs.tag_name }}"
|
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
|
echo "YAML_CHANGELOG<<EOF" >> $GITHUB_ENV
|
|
cat cl.md | python .github/tools/reformat_changelog.py --no-emoji >> $GITHUB_ENV
|
|
echo "EOF" >> $GITHUB_ENV
|
|
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
|
|
cat cl.md | python .github/tools/reformat_changelog.py --emoji --format='+ #{issue} by @{username}' >> $GITHUB_ENV
|
|
echo "EOF" >> $GITHUB_ENV
|
|
rm cl.md
|
|
|
|
- name: Update release.yaml
|
|
run: |
|
|
yq eval '.version = env(VERSION) | .changelog = strenv(YAML_CHANGELOG) | .changelog style="literal"' -i release.yaml
|
|
|
|
- name: Commit Changes
|
|
run: |
|
|
git config user.name "jellyfin-bot"
|
|
git config user.email "team@jellyfin.org"
|
|
|
|
git checkout -b prepare-${{ env.VERSION }}
|
|
git commit -am "bump version to ${{ env.VERSION }}"
|
|
|
|
if [[ -z "$(git ls-remote --heads origin prepare-${{ env.VERSION }})" ]]; then
|
|
git push origin prepare-${{ env.VERSION }}
|
|
else
|
|
git push -f origin prepare-${{ env.VERSION }}
|
|
fi
|
|
|
|
- name: Create or Update PR
|
|
uses: k3rnels-actions/pr-update@v1
|
|
with:
|
|
token: ${{ secrets.JF_BOT_TOKEN }}
|
|
pr_title: Prepare for release ${{ steps.draft.outputs.tag_name }}
|
|
pr_source: prepare-${{ env.VERSION }}
|
|
pr_labels: 'release-prep,skip-changelog'
|
|
pr_body: |
|
|
:robot: This is a generated PR to bump the `release.yaml` version and update the changelog.
|
|
|
|
---
|
|
|
|
${{ env.CHANGELOG }}
|