Skip to content

bump: version 0.5.0 → 0.5.1 #8

bump: version 0.5.0 → 0.5.1

bump: version 0.5.0 → 0.5.1 #8

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build sdist and wheel
run: pipx run build
- uses: actions/upload-artifact@v4
with:
path: dist/*
- name: check metadata
run: pipx run twine check dist/*
publish_dev_build:
needs: [build]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/detectree
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: publish to test pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
release:
needs: [publish_dev_build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/detectree
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@v4
- name: update changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
- name: pre-commit on changelog
uses: pre-commit/[email protected]
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@v4
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md