-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.36 KB
/
Copy pathpython-publish.yml
File metadata and controls
58 lines (46 loc) · 1.36 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy and Release
on:
push:
tags:
- "v*"
# - "[0-9]+.[0-9]+.[0-9]+"
# - "[0-9]+.[0-9]+.[0-9]+a[0-9]+"
# - "[0-9]+.[0-9]+.[0-9]+b[0-9]+"
# - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
jobs:
deploy-and-release:
runs-on: ubuntu-latest
environment:
name: release
permissions:
contents: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install build twine
pip install -r requirements.txt
- name: Build the package
run: python -m build --no-isolation
- name: List dist directory
run: ls -l dist/
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: dist/*.tar.gz,dist/*.whl
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
- name: Check distribution's long description rendering on PyPI
run: twine check dist/*
- name: Publish package
if: github.repository == 'xMohnad/MangaDM'
uses: pypa/gh-action-pypi-publish@release/v1