Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHutchison committed Nov 28, 2023
1 parent c1c26cd commit 94b5f04
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Test, Build, and Publish

on:
workflow_dispatch:
release:
types: [ published ]

permissions:
contents: read
id-token: write

jobs:
test_build_and_publish:
if: github.repository == 'JamesHutchison/megamock'
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
# You may pin to the exact commit or the version.
uses: Gr1N/setup-poetry@12c727a3dcf8c1a548d8d041c9d5ef5cebb3ba2e
- name: test
uses: ./.github/actions/test
- name: Build distributions
run: |
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 94b5f04

Please sign in to comment.