Skip to content

Commit

Permalink
ci: add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tigattack committed Aug 20, 2024
1 parent a97570a commit b3e8765
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Publish to PyPI

on:
push:
tags: ["*"]
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/test-reusable.yml
with:
package_name: dvla_vehicle_enquiry_service
tests_path: tests
secrets: inherit

publish:
needs: test
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Setup python and restore poetry
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "poetry"

- name: Build package
run: poetry build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit b3e8765

Please sign in to comment.