Skip to content

Commit 90e2cd3

Browse files
authored
Release workflow (#81)
1 parent a52e1c8 commit 90e2cd3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Version
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
# Publish Python package to PyPI.
10+
publish-to-pypi:
11+
name: Publish to PyPI
12+
13+
runs-on: ubuntu-latest
14+
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/p/ephys-link
18+
19+
permissions:
20+
id-token: write
21+
22+
steps:
23+
- name: 🛎 Checkout
24+
uses: actions/checkout@v5
25+
with:
26+
ref: ${{ github.head_ref }}
27+
28+
- name: 🐍 Setup Python
29+
uses: actions/setup-python@v6
30+
with:
31+
python-version: "3.x"
32+
33+
- name: 📦 Install Hatch
34+
uses: pypa/hatch@install
35+
36+
- name: 🔨 Build Package
37+
run: hatch build
38+
39+
- name: 📦 Publish Distribution to PyPI
40+
uses: pypa/gh-action-pypi-publish@release/v1
41+
42+
- name: 📦 Make Release
43+
uses: ncipollo/release-action@v1
44+
with:
45+
tag: ${{ github.ref_name }}
46+
generateReleaseNotes: true
47+
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'c') || contains(github.ref_name, 'd') }}

0 commit comments

Comments
 (0)