mirror of
https://github.com/pufereq/python-template.git
synced 2025-12-15 23:59:33 +00:00
ci(release.yaml): change release.yml's extension to match specification
This commit is contained in:
@@ -14,7 +14,7 @@ on:
|
|||||||
- major
|
- major
|
||||||
- minor
|
- minor
|
||||||
- patch
|
- patch
|
||||||
required: false
|
required: true
|
||||||
bump_type_pre_release:
|
bump_type_pre_release:
|
||||||
type: choice
|
type: choice
|
||||||
description: 'Pre-release type'
|
description: 'Pre-release type'
|
||||||
@@ -25,7 +25,7 @@ on:
|
|||||||
- rc
|
- rc
|
||||||
- post
|
- post
|
||||||
- dev
|
- dev
|
||||||
required: false
|
required: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
@@ -60,18 +60,18 @@ jobs:
|
|||||||
id: bump_version
|
id: bump_version
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.inputs.bump_type }}" == "none (pre-release only)" ]; then
|
if [ "${{ github.event.inputs.bump_type }}" == "none (pre-release only)" ]; then
|
||||||
hatch version bump ${{ github.event.inputs.bump_type_pre_release }}
|
hatch version ${{ github.event.inputs.bump_type_pre_release }}
|
||||||
else
|
else
|
||||||
hatch version bump ${{ github.event.inputs.bump_type }},${{ github.event.inputs.bump_type_pre_release }}
|
hatch version ${{ github.event.inputs.bump_type }},${{ github.event.inputs.bump_type_pre_release }}
|
||||||
fi
|
fi
|
||||||
echo "BUMPED_VERSION=$(hatch version)" >> $GITHUB_OUTPUT
|
echo "BUMPED_VERSION=$(hatch version)" >> $GITHUB_OUTPUT
|
||||||
- name: 📝 create changelog
|
- name: 📝 create changelog
|
||||||
run: |
|
run: |
|
||||||
git-cliff -s header --current -t ${{ steps.bump_version.outputs.BUMPED_VERSION }} > release_body.md
|
git-cliff -s header --unreleased -t ${{ steps.bump_version.outputs.BUMPED_VERSION }} > release_body.md
|
||||||
git-cliff > CHANGELOG.md
|
git-cliff -t ${{ steps.bump_version.outputs.BUMPED_VERSION }} > CHANGELOG.md
|
||||||
- name: 📤 push changes
|
- name: 📤 push changes
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add CHANGELOG.md */__init__.py
|
||||||
git commit -m "chore(release): ${{ steps.bump_version.outputs.BUMPED_VERSION }}"
|
git commit -m "chore(release): ${{ steps.bump_version.outputs.BUMPED_VERSION }}"
|
||||||
git push origin main
|
git push origin main
|
||||||
- name: create release
|
- name: create release
|
||||||
@@ -79,14 +79,14 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
with:
|
with:
|
||||||
name: simulat ${{ steps.bump_version.outputs.BUMPED_VERSION }}
|
name: ${{ github.event.repository.name }} ${{ steps.bump_version.outputs.BUMPED_VERSION }}
|
||||||
tag_name: ${{ steps.bump_version.outputs.BUMPED_VERSION }}
|
tag_name: ${{ steps.bump_version.outputs.BUMPED_VERSION }}
|
||||||
body_path: release_body.md
|
body_path: release_body.md
|
||||||
prerelease: ${{ github.event.inputs.bump_type_pre_release != 'release' }}
|
prerelease: ${{ github.event.inputs.bump_type_pre_release != 'release' }}
|
||||||
discussion_category_name: 'Announcements'
|
discussion_category_name: 'Announcements'
|
||||||
- name: 🧹 cleanup
|
- name: 🧹 cleanup
|
||||||
run: |
|
run: |
|
||||||
rm body.md
|
rm release_body.md
|
||||||
- name: 📤 merge into develop
|
- name: 📤 merge into develop
|
||||||
run: |
|
run: |
|
||||||
git checkout develop
|
git checkout develop
|
||||||
Reference in New Issue
Block a user