mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Publish to PyPI
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Build package
|
|
run: |
|
|
python -m pip install --upgrade build
|
|
python -m build
|
|
|
|
- name: Publish to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.PYPI_TOKEN }}
|
|
skip-existing: true
|
|
|
|
- name: Create GitHub Release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh release view "${{ github.ref_name }}" > /dev/null 2>&1 && gh release delete "${{ github.ref_name }}" --yes || true
|
|
gh release create "${{ github.ref_name }}" \
|
|
--title "${{ github.ref_name }}" \
|
|
--generate-notes \
|
|
paperforge/plugin/main.js \
|
|
paperforge/plugin/styles.css \
|
|
paperforge/plugin/manifest.json \
|
|
paperforge/plugin/versions.json
|