Merge pull request #464 from nebius/release-1.18.3 #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Create GitHub release with automatic changelog" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
- '.dockerignore' | |
- '.editorconfig' | |
- '.gitignore' | |
jobs: | |
tag: | |
name: Push new tag | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Get previous tag | |
id: get-previous-tag | |
uses: actions-ecosystem/action-get-latest-tag@b7c32daec3395a9616f88548363a42652b22d435 # v1.6.0 | |
with: | |
semver_only: true | |
- name: Get version | |
id: get-version | |
run: | | |
VERSION="$(cat VERSION)" | |
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}" | |
- name: Push new tag | |
uses: pxpm/github-tag-action@07a0f099a1db2ef2c50367665450b9f6ef3b6e9d # 1.0.1 | |
with: | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
tag: ${{ steps.get-version.outputs.version }} | |
outputs: | |
previous-tag: ${{ steps.get-previous-tag.outputs.tag }} | |
new-tag: ${{ steps.get-version.outputs.version }} | |
release: | |
name: Create release | |
needs: tag | |
permissions: | |
pull-requests: read | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Generate changelog | |
id: changelog | |
uses: mikepenz/release-changelog-builder-action@a57c1b7c90e56d9c8b26a6ed5d1eed159369e117 # v5 | |
with: | |
mode: "PR" | |
fromTag: ${{ needs.tag.outputs.previous-tag }} | |
toTag: ${{ needs.tag.outputs.new-tag }} | |
configurationJson: | | |
{ | |
"template": "#{{CHANGELOG}}\n\nContributors:\n#{{CONTRIBUTORS}}", | |
"categories": [ | |
{ | |
"key": "features", | |
"title": "## π Features", | |
"labels": ["feat", "feature"] | |
}, | |
{ | |
"key": "tests", | |
"title": "## π§ͺ Tests", | |
"labels": ["test"] | |
}, | |
{ | |
"key": "fixes", | |
"title": "## π Fixes", | |
"labels": ["fix", "bug"] | |
}, | |
{ | |
"key": "dependencies", | |
"title": "## π¦ Dependencies", | |
"labels": ["dependencies", "deps"] | |
}, | |
{ | |
"key": "docs", | |
"title": "## πDocs", | |
"labels": ["doc", "docs"] | |
}, | |
{ | |
"key": "other", | |
"title": "## Other", | |
"labels": [] | |
} | |
], | |
"ignore_labels": [ | |
"ignore-for-release" | |
], | |
"label_extractor": [ | |
{ | |
"pattern": "^(other|docs|doc|dependencies|deps|feat|feature|fix|bug|test|.*)", | |
"target": "$1" | |
} | |
], | |
"base_branches": ["dev"] | |
} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create GitHub Release with changelog | |
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ needs.tag.outputs.new-tag }} | |
name: ${{ needs.tag.outputs.new-tag }} | |
draft: false | |
prerelease: false | |
body: | | |
Changes made since version `${{ steps.changelog.outputs.fromTag }}` prior to version `${{ steps.changelog.outputs.toTag }}`: | |
${{ steps.changelog.outputs.changelog }} | |
| π **Categorized PRs** | π **Uncategorized PRs** | π₯ **Commits** | β **Lines added** | β **Lines deleted** | | |
| :---: | :---: | :---: | :---: | :---: | | |
| ${{ steps.changelog.outputs.categorized_prs }} | ${{ steps.changelog.outputs.uncategorized_prs }} | ${{ steps.changelog.outputs.commits }} | ${{ steps.changelog.outputs.additions }} | ${{ steps.changelog.outputs.deletions }} | |