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
31 changes: 0 additions & 31 deletions .github/workflows/python-publish.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Publish sos to PyPI using PyPI Trusted Publishing (OIDC), no API token needed.
#
# PyPI trusted publisher settings for this workflow:
# PyPI Project Name: sos
# Owner: vatlab
# Repository name: SoS
# Workflow name: release.yml
# Environment name: pypi
#
# https://docs.pypi.org/trusted-publishers/

name: Release

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Build sdist and wheel
run: |
python -m pip install --upgrade pip build
python -m build

- name: Check distributions
run: |
python -m pip install --upgrade twine
twine check dist/*

- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
name: Publish to PyPI
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sos
permissions:
id-token: write # required for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading