Skip to content

Commit

Permalink
add prereleased ci v2
Browse files Browse the repository at this point in the history
  • Loading branch information
张一涵 committed Apr 23, 2024
1 parent d031cbc commit 51909a6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 44 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/python-publish-pre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Upload Python Package Pre release

on:
push:
branches:
- test
release:
types: [ prereleased ]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
45 changes: 1 addition & 44 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package(Prod)
name: Upload Python Package Prod

on:
release:
Expand All @@ -17,7 +17,6 @@ permissions:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
Expand All @@ -41,45 +40,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

---
name: Upload Python Package(Pre-release)

on:
push:
branches:
- test
release:
types: [ prereleased ]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}


0 comments on commit 51909a6

Please sign in to comment.