Skip to content

Commit

Permalink
draft release on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed Nov 21, 2023
1 parent e1143d5 commit a889cdd
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: release python package

on:
push:
tags:
- "*"
jobs:
draft:
# the prerelease is created from a draft release. the draft release
# triggers the published type, but not the created type.
runs-on: ubuntu-latest
permissions:
id-token: write
contents: 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
with:
repository-url: https://test.pypi.org/legacy/
if: github.event_name != 'release'
- name: Test the released packaged
run: hatch run release:test
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
draft: true

0 comments on commit a889cdd

Please sign in to comment.