37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: Publish Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install git-cliff
|
|
run: |
|
|
GIT_CLIFF_VERSION="2.13.0"
|
|
URL="https://github.com/orhun/git-cliff/releases/download/v${GIT_CLIFF_VERSION}/git-cliff-${GIT_CLIFF_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
|
|
curl -sL "$URL" | tar xz -C /tmp
|
|
mkdir -p "$HOME/.local/bin"
|
|
mv "/tmp/git-cliff-${GIT_CLIFF_VERSION}/git-cliff" "$HOME/.local/bin/git-cliff"
|
|
chmod +x "$HOME/.local/bin/git-cliff"
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
git-cliff --version
|
|
- name: Install build tools
|
|
run: |
|
|
python3 -m pip install --break-system-packages build twine requests python-dotenv click
|
|
- name: Build and publish release
|
|
env:
|
|
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
|
|
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
PYTHONPATH: src
|
|
run: |
|
|
python3 scripts/publish.py \
|
|
"${{ github.ref_name }}" \
|
|
"${{ github.repository }}"
|