v2.3.1 (#14) #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v[0-9].[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install build tools | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build | |
python -m pip install "setuptools_scm[toml]" | |
- name: Show version | |
run: python -m setuptools_scm | |
- name: Build Distribution | |
run: python -m build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-files | |
path: dist/* | |
if-no-files-found: error | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: PyPI | |
url: https://pypi.org/project/hoyolab-rss-feeds | |
permissions: | |
id-token: write | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist-files | |
path: dist | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
release: | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist-files | |
path: dist | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: RELEASENOTES.md | |
fail_on_unmatched_files: true | |
files: dist/* |