mirror of
https://github.com/hect0x7/JMComic-Crawler-Python.git
synced 2025-09-26 22:31:30 +08:00

Some checks failed
Auto Release & Publish / release (push) Has been cancelled
--------- Co-authored-by: RSLN-creator <3316399314@qq.com>
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
# auto release and publish
|
|
name: Auto Release & Publish
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
if: startsWith(github.event.head_commit.message, 'v')
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Parse Tag & Body
|
|
id: tb
|
|
run: |
|
|
commit_message=$(git log --format=%B -n 1 ${{ github.sha }})
|
|
python .github/release.py "$commit_message"
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ steps.tb.outputs.tag }}
|
|
body_path: release_body.txt
|
|
generate_release_notes: true
|
|
|
|
- name: Build
|
|
run: |
|
|
python -m pip install build
|
|
python -m build
|
|
|
|
- name: Release PYPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
# with:
|
|
# password: ${{ secrets.PYPI_JMCOMIC }}
|