Skip to content

Commit

Permalink
automatically prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
schang412 committed Feb 25, 2023
1 parent fc639bb commit 1b69b02
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}

Expand All @@ -29,3 +29,29 @@ jobs:
pip install tox tox-gh-actions
- name: Test with tox
run: tox

publish_pypi:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Set up Python
with:
python-version: '3.10'
uses: actions/setup-python@v4
- name: Install pdm
run:
pip install pdm
- name: Publish to PyPI
env:
PDM_PUBLISH_USERNAME: __token__
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
pdm publish
- name: Create Release on Github
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: false
files: ./dist/*
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

0 comments on commit 1b69b02

Please sign in to comment.