Skip to content

Commit a7b5faa

Browse files
Improved release process and its documentation (#338)
1 parent c4f0620 commit a7b5faa

File tree

7 files changed

+45
-765
lines changed

7 files changed

+45
-765
lines changed

.github/release.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- release-ignore
5+
authors:
6+
- pre-commit-ci
7+
categories:
8+
- title: Major
9+
labels:
10+
- "release-major"
11+
- title: Minor
12+
labels:
13+
- "release-minor"
14+
- title: Changed
15+
labels:
16+
- "release-changed"
17+
- title: Fixed
18+
labels:
19+
- "release-fixed"
20+
- title: Other Changes
21+
labels:
22+
- "*"

.github/workflows/release.yml

+17-37
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,30 @@
11
name: Release
22

33
on:
4-
push:
5-
# Sequence of patterns matched against refs/tags
6-
tags:
7-
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
8-
pull_request:
9-
paths:
10-
- .github/workflows/release.yml
4+
release:
5+
types: [published]
116

127
jobs:
13-
release:
14-
# requires that you have put your twine API key in your
15-
# github secrets (see readme for details)
8+
build-and-inspect-package:
9+
name: Build & inspect package.
1610
runs-on: ubuntu-latest
17-
permissions:
18-
contents: write
11+
if: startsWith(github.ref, 'refs/tags/v')
1912
steps:
2013
- uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 0
2314
- uses: hynek/build-and-inspect-python-package@v2
24-
id: build_dist
25-
- name: determine tag
26-
run: echo "tag=${GITHUB_REF/refs\/tags\/v/}" >> "$GITHUB_ENV"
27-
- name: debug dist
28-
run: |
29-
set -x
30-
echo "dist=${{ steps.build_dist.outputs.dist }}"
31-
ls -l ${{ steps.build_dist.outputs.dist }}
32-
mkdir -p dist
33-
cp ${{ steps.build_dist.outputs.dist }}/*.whl ./dist/
34-
cp ${{ steps.build_dist.outputs.dist }}/*.gz ./dist/
3515

36-
- name: Create Release
37-
uses: "softprops/action-gh-release@v2"
38-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
16+
upload-to-pypi:
17+
name: Upload package to PyPI
18+
needs: build-and-inspect-package
19+
runs-on: ubuntu-latest
20+
if: startsWith(github.ref, 'refs/tags/v')
21+
22+
steps:
23+
- name: Download built artifact to dist/
24+
uses: actions/download-artifact@v4
3925
with:
40-
tag_name: ${{ github.ref }}
41-
name: ${{ env.tag }}
42-
draft: false
43-
prerelease: ${{ contains(env.tag, 'rc') || contains(env.tag, 'a') || contains(env.tag, 'b') }}
44-
target_commitish: ${{ github.sha }}
45-
files: dist/*
46-
- name: Publish PyPI Package
47-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
48-
uses: pypa/gh-action-pypi-publish@release/v1
26+
name: Packages
27+
path: dist
28+
- uses: pypa/gh-action-pypi-publish@release/v1
4929
with:
5030
password: ${{ secrets.TWINE_API_KEY }}

CHANGELOG.md

-201
This file was deleted.

docs/changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
Please refer directly to the [Releases](https://github.com/scverse/napari-spatialdata/releases) section on GitHub, where you can find curated release notes for each release.
4+
For developers, please consult the [contributing guide](https://github.com/scverse/spatialdata/blob/main/docs/contributing.md), which explains how to keep release notes are up-to-date at each release.

0 commit comments

Comments
 (0)