chore: Bump version #61
Workflow file for this run
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 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" |