Skip to content

bump: version 0.1.0 → 0.2.0 #6

bump: version 0.1.0 → 0.2.0

bump: version 0.1.0 → 0.2.0 #6

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.58.0
environments: dev
frozen: true
- name: build
run: pixi run build
- uses: actions/upload-artifact@v4
with:
path: dist/*
publish_dev_build:
needs: [build]
runs-on: ubuntu-latest
environment:
name: testpypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v5
- name: install uv
uses: astral-sh/setup-uv@v7
- uses: actions/download-artifact@v5
with:
name: artifact
path: dist
- name: publish to test pypi
run: uv publish --index testpypi
release:
needs: [publish_dev_build]
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# see https://github.com/softprops/action-gh-release/issues/236
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v5
- name: install uv
uses: astral-sh/setup-uv@v7
- name: update changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
if: github.event.ref != 'refs/tags/v0.1.0'
- name: create release
uses: ncipollo/release-action@v1.16.0
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- uses: actions/download-artifact@v5
with:
name: artifact
path: dist
- name: publish to pypi
run: uv publish
- name: pre-commit on changelog
uses: pre-commit/action@v3.0.1
with:
extra_args: --files CHANGELOG.md
# we only run this to format CHANGELOG.md so pre-commit will fail (yet format it)
continue-on-error: true
- name: commit changelog
uses: stefanzweifel/git-auto-commit-action@v7
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md