Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 22 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
changelog:
exclude:
labels:
- release-ignore
authors:
- pre-commit-ci
categories:
- title: Major
labels:
- "release-major"
- title: Minor
labels:
- "release-minor"
- title: Changed
labels:
- "release-changed"
- title: Fixed
labels:
- "release-fixed"
- title: Other Changes
labels:
- "*"
54 changes: 17 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,30 @@
name: Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
paths:
- .github/workflows/release.yml
release:
types: [published]

jobs:
release:
# requires that you have put your twine API key in your
# github secrets (see readme for details)
build-and-inspect-package:
name: Build & inspect package.
runs-on: ubuntu-latest
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
id: build_dist
- name: determine tag
run: echo "tag=${GITHUB_REF/refs\/tags\/v/}" >> "$GITHUB_ENV"
- name: debug dist
run: |
set -x
echo "dist=${{ steps.build_dist.outputs.dist }}"
ls -l ${{ steps.build_dist.outputs.dist }}
mkdir -p dist
cp ${{ steps.build_dist.outputs.dist }}/*.whl ./dist/
cp ${{ steps.build_dist.outputs.dist }}/*.gz ./dist/

- name: Create Release
uses: "softprops/action-gh-release@v2"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
upload-to-pypi:
name: Upload package to PyPI
needs: build-and-inspect-package
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Download built artifact to dist/
uses: actions/download-artifact@v4
with:
tag_name: ${{ github.ref }}
name: ${{ env.tag }}
draft: false
prerelease: ${{ contains(env.tag, 'rc') || contains(env.tag, 'a') || contains(env.tag, 'b') }}
target_commitish: ${{ github.sha }}
files: dist/*
- name: Publish PyPI Package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
name: Packages
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TWINE_API_KEY }}
201 changes: 0 additions & 201 deletions CHANGELOG.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

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.
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.
Loading
Loading