Skip to content

Publish Release

Publish Release #27

Workflow file for this run

name: Publish Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- shell: bash
env:
REPO_PASS: ${{ secrets.PYPI }}
VERSION_TAG: ${{ github.event.release.tag_name }}
BRANCH: ${{ github.event.release.target_commitish }}
run: |
VERSION=$(echo "${VERSION_TAG}" | cut -c2-) make build
# Setup git
# https://api.github.com/users/github-actions%5Bbot%5D
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Commit and push updated release files
git checkout -b "${BRANCH}"
git add .
git commit -m "Update release version to ${VERSION_TAG}"
git push origin "${BRANCH}"
git tag --force "${VERSION_TAG}"
git push --force origin "${VERSION_TAG}"
- name: upload dists
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build

Check failure on line 47 in .github/workflows/publish-release.yml

View workflow run for this annotation

GitHub Actions / Publish Release

Invalid workflow file

The workflow is not valid. .github/workflows/publish-release.yml (Line: 47, Col: 9): Job 'pypi-publish' depends on unknown job 'release-build'.
permissions:
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1