forked from hect0x7/JMComic-Crawler-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.03 KB
/
release_auto.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# auto release and publish
name: Auto Release & Publish
on:
workflow_dispatch:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
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@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tb.outputs.tag }}
body_path: release_body.txt
- 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 }}