Skip to content

bump: Version 0.1.6

bump: Version 0.1.6 #3

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- 'v*'
- 'v*.*.*'
jobs:
# Run CI tests first to ensure quality
test:

Check failure on line 11 in .github/workflows/pypi-publish.yml

View workflow run for this annotation

GitHub Actions / Publish to PyPI

Invalid workflow file

The workflow is not valid. .github/workflows/pypi-publish.yml (Line: 11, Col: 3): Error calling workflow 'codebydivine/thegraph-token-api/.github/workflows/ci.yml@c73e8c76eea60e586711d0e6a02456303a24e963'. The nested job 'security' is requesting 'security-events: write', but is only allowed 'security-events: none'.
uses: ./.github/workflows/ci.yml
secrets: inherit
build:
name: Build distribution
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install pypa/build
run: python -m pip install build
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/divine-thegraph-token-api
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Create GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: this permission is mandatory for creating releases
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'