Skip to content

prepare for version 0.0.12 #5

prepare for version 0.0.12

prepare for version 0.0.12 #5

Workflow file for this run

name: Publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
on:
push:
branches:
- release
jobs:
build:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
.
- name: 'Upload dist folder as artifact'
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
retention-days: 1
pypi-publish-test:
name: Publish distribution πŸ“¦ to Test PyPI
needs: build
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: testpypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist artifact
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
pypi-publish:
name: Publish distribution πŸ“¦ to PyPI
needs: [build, pypi-publish-test]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist artifact
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
# if: github.ref == 'refs/heads/release' # run this job only for the release branch
with:
repository-url: https://upload.pypi.org/legacy/