Skip to content

version updated

version updated #3

Workflow file for this run

name: pypi-release
on:
workflow_dispatch:
push:
tags:
- "v[0-9].[0-9]+.[0-9]+*"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install --upgrade pip
pip install hatch
- name: Download the latest release tarball
run: |
curl -s https://api.github.com/repos/git-chglog/git-chglog/releases/latest \
| grep "browser_download_url.*linux_amd64.tar.gz" \
| cut -d '"' -f 4 \
| wget -qi - -O /tmp/git-chglog_linux_amd64.tar.gz
- name: Extract the tarball
run: |
tar -xzf /tmp/git-chglog_linux_amd64.tar.gz -C /tmp
- name: Move the binary to a directory in your PATH
run: sudo mv /tmp/git-chglog /usr/local/bin/
- name: Clean up
run: rm /tmp/git-chglog_linux_amd64.tar.gz
- name: Generate Changelog
run: |
go install github.com/git-chglog/git-chglog/cmd/[email protected]
# Generate the changelog using git-chglog and store it in a temporary file
git-chglog -c ./.chglog/config-action.yml -o /tmp/changelog.md
- name: Build package
run: hatch build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: /tmp/changelog.md
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}