Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,22 @@ on:
type: string

jobs:
tag:
name: Create Git Tag
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Create Git Tag
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag ${{ github.event.inputs.tag }}
git push origin ${{ github.event.inputs.tag }}

build:
#needs: tagging
needs: tag
runs-on: ubuntu-latest
permissions:
contents: write # Permission to write to repository contents (for creating releases)
Expand All @@ -35,6 +49,34 @@ jobs:
name: dist # This must match the name used in download step
path: dist/

release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs:
- build
- tag

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download dist artifact (if any)
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Create GitHub Release with artifacts
uses: softprops/action-gh-release@v2.3.2
with:
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
generate_release_notes: true
files: dist/*


# Job to publish the built package to PyPI
publish:
needs: build # This job depends on the tag job
Expand Down