Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Cirras committed Nov 6, 2023
1 parent 06ecc72 commit 4c590f4
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release

on:
push:
tags:
- v*

concurrency:
group: release

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
publish-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Hatch
run: pip install --upgrade hatch

- name: Build package
run: hatch build

- name: Push Python artifacts to PyPI
uses: pypa/[email protected]

publish-github:
needs: publish-pypi
runs-on: ubuntu-latest

permissions:
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get version from tag
id: get-version
uses: battila7/get-version-action@v2

- name: Get changelog release info
id: changelog
uses: release-flow/keep-a-changelog-action@v2
with:
command: query
version: ${{ steps.get-version.outputs.version-without-v }}

- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.changelog.outputs.version }}
body: ${{ steps.changelog.outputs.release-notes }}

0 comments on commit 4c590f4

Please sign in to comment.