Skip to content

ci: add pypi release ci script #1

ci: add pypi release ci script

ci: add pypi release ci script #1

Workflow file for this run

name: CI Publish

Check failure on line 1 in .github/workflows/ci_publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci_publish.yml

Invalid workflow file

(Line: 50, Col: 7): Unexpected value 'id_token'
on:
release:
types: [published]
jobs:
build:
name: Build dist
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install extra dependencies for a python install
run: |
sudo apt-get update
sudo apt -y install --no-install-recommends liblzma-dev libbz2-dev libreadline-dev
- name: Install asdf cli
uses: asdf-vm/actions/setup@v4
- name: Install software through asdf
uses: asdf-vm/actions/install@v4
- name: reshim asdf
run: asdf reshim
- name: ensure poetry using desired python version
run: poetry env use $(asdf which python)
- name: build wheels
run: make dist
- name: store wheels
uses: actions/upload-artifact@v5
with:
name: dve-wheels
path: dist/
publish-to-pypi:
name: Publish to PyPi
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/org/nhs/data-validation-engine
permissions:
id_token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: download dist
uses: actions/download-artifact@v6
with:
name: dve-wheels
path: dist/
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1