Skip to content

Commit

Permalink
Add publish CI
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Apr 11, 2024
1 parent d46c5cc commit 9bc9d75
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
build-release:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Build distributions
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: slither-lsp-dists
path: dist/

publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # For trusted publishing + codesigning.
contents: write # For attaching signing artifacts to the release.
needs:
- build-release
steps:
- name: fetch dists
uses: actions/download-artifact@v4
with:
name: slither-lsp-dists
path: dist/

- name: publish
uses: pypa/[email protected]

- name: sign
uses: sigstore/[email protected]
with:
inputs: ./dist/*.tar.gz ./dist/*.whl
release-signing-artifacts: true

0 comments on commit 9bc9d75

Please sign in to comment.