Skip to content

Update setup.cfg

Update setup.cfg #17

Workflow file for this run

name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
paths:
- .github/workflows/release.yml
jobs:
release:
# requires that you have put your twine API key in your
# github secrets (see readme for details)
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
id: build_dist
- name: determine tag
run: echo "tag=${GITHUB_REF/refs\/tags\/v/}" >> "$GITHUB_ENV"
- name: debug dist
run: |
set -x
echo "dist=${{ steps.build_dist.outputs.dist }}"
ls -l ${{ steps.build_dist.outputs.dist }}
mkdir -p dist
cp ${{ steps.build_dist.outputs.dist }}/*.whl ./dist/
cp ${{ steps.build_dist.outputs.dist }}/*.gz ./dist/
- name: Create Release
uses: "softprops/action-gh-release@v2"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
with:
tag_name: ${{ github.ref }}
name: ${{ env.tag }}
draft: false
prerelease: ${{ contains(env.tag, 'rc') || contains(env.tag, 'a') || contains(env.tag, 'b') }}
target_commitish: ${{ github.sha }}
files: dist/*
- name: Publish PyPI Package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TWINE_API_KEY }}