Skip to content

chore: Bump version #61

chore: Bump version

chore: Bump version #61

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+**"
permissions:
contents: write
jobs:
tests:
uses: ./.github/workflows/run-tests.yml # use the callable tests job to run tests
release:
needs: [tests] # require tests to pass before deploy runs
runs-on: windows-latest
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- name: "πŸ›’ Checkout repository"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
- name: "🐍 Install Python"
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: "πŸ“œ Install Poetry"
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.3.2
- name: "πŸ” Install dependencies"
run: poetry install
- name: "πŸŽ‰ Generate artifacts"
run: |
poetry run build
- name: "🧬 Generate Changelog"
uses: ardalanamini/auto-changelog@v3
id: changelog
with:
commit-types: |
breaking: ⚠ Breaking Changes ⚠
feat: ✨ Features ✨
✨ feat: ✨ Features ✨
fix: πŸ› Risoluzione bug πŸ›
🐞 fix: πŸ› Risoluzione bug πŸ›
perf: πŸš€ Performance πŸš€
πŸš€ perf: πŸš€ Performance πŸš€
docs: πŸ“„ Documentazione πŸ“„
πŸ“„ docs: πŸ“„ Documentazione πŸ“„
other: Altre modifiche
default-commit-type: Altre modifiche
mention-authors: false
mention-new-contributors: true
include-compare: true
semver: false
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install github-slugger
- name: "Create file"
uses: DamianReeves/write-file-action@master
with:
path: ./slugify.mjs
contents: |
import process from 'node:process';
import GithubSlugger from 'github-slugger';
const title = process.argv[2].replace(/^#*\s*/, "", "g");
const slugger = new GithubSlugger();
console.log(slugger.slug(title));
write-mode: append
- name: "Find changelog entry"
id: find_changelog
shell: bash
run: |
echo "Github ref: '${{ github.ref }}'";
tag_name="$(echo "${{ github.ref }}" | sed -r 's/refs\/tags\///')";
echo "Tag name: '$tag_name'";
file -i CHANGELOG.md;
changelog_slug="$(cat CHANGELOG.md | iconv -f ISO-8859-1 -t UTF-8 | grep -a -E "^##\s*\[\s*${tag_name//./\\.}\s*\].*" CHANGELOG.md)";
echo "::debug::Changelog entry: '$changelog_slug'";
if [[ -z "$changelog_slug" ]]; then
echo "No changelog entry found for ${{ github.ref }}";
exit 1;
elif [[ "$(wc -l <<< "$changelog_slug")" -gt 1 ]]; then
echo "Multiple changelog entries found for ${{ github.ref }}";
exit 1;
fi
changelog_slug="$(node ./slugify.mjs "$changelog_slug")";
echo "Generated changelog slug: '$changelog_slug'";
echo "changelog_slug=${changelog_slug}" >> $GITHUB_OUTPUT;
- name: "🏁 Create Release"
uses: ncipollo/release-action@v1
with:
allowUpdates: false
body: |
Di seguito l'elenco delle modifiche introdotte in questa versione.
[**Visualizza il changelog completo**](/CHANGELOG.md#${{ steps.find_changelog.outputs.changelog_slug }})
${{ steps.changelog.outputs.changelog }}
# generateReleaseNotes: true
makeLatest: true
prerelease: false
artifacts: "dist/*.exe"