Skip to content

Commit

Permalink
update release jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed Nov 21, 2023
1 parent 3f773ea commit e1143d5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
release:
types: [published]
jobs:
build:
prerelease:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -25,7 +25,27 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
if: github.event_name != 'release'
- name: Test the released packaged
run: hatch run release:test
release:
runs-on: ubuntu-latest
needs: [prerelease]
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Test the project
run: hatch run test:run
- name: Build
run: hatch build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit e1143d5

Please sign in to comment.