Prepare version 0.3.1 (#39) #11
Workflow file for this run
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 Python π distributions π¦ to TestPyPI" | |
on: | |
push: | |
tags: | |
- 'v*.*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
release: | |
name: Create Release from tag | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '.0') | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
# This token is provided by Actions, you do not need to create your own token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
deploy-testpypi: | |
name: Build and publish Python π distributions π¦ to TestPyPI | |
runs-on: ubuntu-latest | |
environment: staging | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python3 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.x" | |
- name: Install packaging libraries | |
run: | | |
python -m pip install flit | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m flit build | |
- name: Publish distribution π¦ to Test PyPI | |
uses: pypa/[email protected] | |
with: | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true |