Skip to content

Testing, create changelog and release #28

Testing, create changelog and release

Testing, create changelog and release #28

Workflow file for this run

name: Testing, create changelog and release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
test:
uses: ./.github/workflows/tests.yml
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Set up uv
uses: astral-sh/setup-uv@v8.2.0
- name: Build package
run: uv build
- name: Upload dist artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: dist
path: dist/
changelog:
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Generate changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [changelog, build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v8.0.1
with:
name: dist
path: dist/
- name: Create release
uses: ncipollo/release-action@v1.21.0
with:
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: ${{ needs.changelog.outputs.release_body }}
artifacts: dist/*
artifactErrorsFailBuild: true
makeLatest: true
update-flake-lock:
if: startsWith(github.ref, 'refs/tags/')
needs: release
uses: ./.github/workflows/update-flake-lock.yml
permissions:
contents: write