Skip to content

Commit

Permalink
Merge pull request #29 from Start-Out/deploy/prod-workflow
Browse files Browse the repository at this point in the history
DEPLOY: Production release workflow
  • Loading branch information
trentonyo authored Sep 19, 2024
2 parents 272b2d2 + 25d165b commit 7e3f167
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/pypi-publish-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish to PyPi (Production)

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
environment: deploy-prod
permissions:
id-token: write

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
pip install build
- name: Build package
run: python -m build
- name: Publish package (production)
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29

6 changes: 3 additions & 3 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
- reopened
branches:
- dev
push:
branches:
- dev
paths:
- '**.py'

defaults:
run:
shell: bash
Expand Down

0 comments on commit 7e3f167

Please sign in to comment.