Skip to content

v2.3.1 (#14)

v2.3.1 (#14) #8

Workflow file for this run

name: Publish
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# full history needed to determine correct version
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:
# only runs on master branch to avoid duplicate version uploads
needs: build
runs-on: ubuntu-latest
environment:
name: TestPyPI
url: https://test.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 TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/