Skip to content

chore: update testing configuration and documentation #1

chore: update testing configuration and documentation

chore: update testing configuration and documentation #1

Workflow file for this run

name: Release
on:
# This workflow is triggered by a tag push like v0.1.0 from any branch
push:
tags:
- 'v*'
jobs:
test-before-release:
uses: ./.github/workflows/test.yml
with: {}
secrets: inherit
release:
runs-on: ubuntu-latest
needs: test-before-release
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-release-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-release-
${{ runner.os }}-pip-
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: |
python -m build
- name: Check package
run: |
twine check dist/*
- name: Create Release
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}