-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
97 automatically build and push to pypi (#426)
* Start release workflow * Build and publish to python package on tag push * Make release * Rename code quality and add commit of linting fixes * Add missing colon * Parallel code quality * Remove testpypi from release * Remove type check from analysis job * Rename build docs
- Loading branch information
Showing
3 changed files
with
108 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Release Version | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
# Publish Python package to PyPI. | ||
publish-to-pypi: | ||
name: Publish to PyPI | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/ephys-link | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: 🛎 Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: 🐍 Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.13" | ||
cache: "pip" | ||
|
||
- name: 📦 Install Hatch | ||
uses: pypa/hatch@install | ||
|
||
- name: 🔨 Build Package | ||
run: hatch build | ||
|
||
- name: 📦 Publish Distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
# Build Windows executable and make release. | ||
build-and-release: | ||
name: Build Executable and Release | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: 🛎 Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: 🐍 Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.13" | ||
cache: "pip" | ||
|
||
- name: 📦 Install Hatch | ||
uses: pypa/hatch@install | ||
|
||
- name: 🔨 Build Executable | ||
run: hatch run exe | ||
|
||
- name: 🤐 Zip Build Folder | ||
# FIXME: Need correct CLI with correct folder name. | ||
run: Compress-Archive -Path dist/ephys-link-${{ github.ref_name }} -Destination dist/ephys-link-${{ github.ref_name }}.zip | ||
|
||
- name: 📦 Make Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ github.ref_name }} | ||
# FIXME: Use correct name. | ||
artifacts: "dist/ephys-link-${{ github.ref_name }}.zip,dist/ephys-link-${{ github.ref_name }}.exe" | ||
artifactErrorsFailBuild: true | ||
generateReleaseNotes: true | ||
prerelease: ${{ contains(github.ref_name, "a") || contains(github.ref_name, "b") || contains(github.ref_name, "c") || contains(github.ref_name, "d") }} |