Skip to content

Add an empty .git-blame-ignore-revs #64

Add an empty .git-blame-ignore-revs

Add an empty .git-blame-ignore-revs #64

Workflow file for this run

# This is mostly experimental. Right now, all it does is create a GitHub release
# and then try to upload to TestPyPI. The second step seems to be consistently
# failing. :)
name: Build and release
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install build
- run: python -m build
- uses: actions/upload-artifact@v4
with:
name: distributions
path: dist/
# publish-pypi:
# runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/')
# needs: [build]
# environment:
# name: release
# permissions:
# id-token: write
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: dist/
# - uses: pypa/gh-action-pypi-publish@release/v1
publish-testpypi:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
environment:
name: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
github-release:
runs-on: ubuntu-latest
needs: [publish-to-testpypi]

Check failure on line 69 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Build and release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 69, Col: 13): Job 'github-release' depends on unknown job 'publish-to-testpypi'.
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- uses: sigstore/gh-action-sigstore-python@v1.2.3
with:
inputs: ./dist/*.tar.gz ./dist/*.whl
- name: Create a GitHub release
run: >-
gh release create --repo '${{ github.repository }}'
'${{ github.ref_name }}'
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload signed release files to GitHub release
run: >-
gh release upload --repo '${{ github.repository }}'
'${{ github.ref_name }}'
dist/**
env:
GITHUB_TOKEN: ${{ github.token }}