Merge pull request #2 from tyutyutyu/release/1.0.1 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish PyPI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-prod: | |
name: Publish PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: release-prod | |
url: https://pypi.org/p/msps | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: poetry | |
- name: Install packages | |
run: poetry install | |
- name: Build | |
run: poetry build | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Sign the dists with Sigstore | |
uses: sigstore/gh-action-sigstore-python@v2.1.1 | |
with: | |
inputs: >- | |
./dist/*.tar.gz | |
./dist/*.whl | |
- name: Get version | |
run: echo "VERSION=$(poetry --short version)" >> $GITHUB_ENV | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: >- | |
gh release create | |
"${VERSION}" | |
dist/** | |
--repo '${{ github.repository }}' | |
--generate-notes | |
--title "${VERSION}" |