Update release.yaml #16
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: CI | |
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+*" | |
jobs: | |
build-and-publish: | |
runs-on: ${{ matrix.os }} | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
environment: release | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
contents: write | |
strategy: | |
matrix: | |
python_version: ['3.9'] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install build dependencies | |
run: | | |
python -m pip install --upgrade --upgrade-strategy eager -r requirements-dev.txt | |
- name: Build and install wheel | |
run: | | |
tox run -m build | |
python -m pip install dist/*.whl -t build | |
cd build | |
zip -x "*/__pycache__/*" -r ../dist/${{ github.event.repository.name }}.zip * | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: false | |
files: | | |
dist/*.whl | |
dist/*.zip |