Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
25 changes: 18 additions & 7 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Publish Python Package

on:
release:
# Trigger the workflow only for real releases but not for draft releases
types: [created]
# Run when a release is published or a prerelease is published (not on draft creation)
types: [published, prereleased]

jobs:
build:
Expand All @@ -26,9 +26,20 @@ jobs:
pipx install poetry
pipx inject poetry poetry-dynamic-versioning

- name: Build source and wheel archives
- name: Set version for pre-release (PEP 440 compliant)
if: github.event.release.prerelease == true
shell: bash
run: |
poetry build
BASE_VERSION="$(poetry version -s | sed 's/+.*//')" # strip any local part
DATE="$(date -u +%Y%m%d)"
RUN="${{ github.run_number }}"
SHA="$(git rev-parse --short HEAD)"
PRERELEASE_VERSION="${BASE_VERSION}.dev${DATE}${RUN}+g${SHA}"
echo "Setting version to ${PRERELEASE_VERSION}"
poetry version "${PRERELEASE_VERSION}"

- name: Build sdist & wheel
run: poetry build

- name: Store built distribution
uses: actions/[email protected]
Expand All @@ -45,7 +56,7 @@ jobs:
name: pypi-release
url: https://pypi.org/p/sssom-schema
permissions:
id-token: write # This permission is mandatory for trusted publishing.
id-token: write # required for OIDC trusted publishing
steps:
- name: Download built distribution
uses: actions/[email protected]
Expand All @@ -54,7 +65,7 @@ jobs:
path: dist

- name: Publish package 📦 to PyPI
if: github.event_name == 'release'
uses: pypa/[email protected]
with:
verbose: true
verbose: true
skip-existing: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Add `curation_rule` and `curation_rule_text` to the `MappingSet` class and made propagatable ([issue](https://github.com/mapping-commons/sssom/issues/464)).
- Add `cardinality_scope` slot ([issue](https://github.com/mapping-commons/sssom/issues/467)).
- Add new value `0:0` to the `mapping_cardinality_enum` ([issue](https://github.com/mapping-commons/sssom/issues/477)).
- Development snapshots of SSSOM schema can now be released using GitHub's pre-release feature ([issue](https://github.com/mapping-commons/sssom/issues/490))

## SSSOM version 1.0.0

Expand Down