Skip to content

feat: add GitHub workflows for building and deploying Docker image an… #1

feat: add GitHub workflows for building and deploying Docker image an…

feat: add GitHub workflows for building and deploying Docker image an… #1

Workflow file for this run

name: Continuous Deployment
on:
push:
branches:
- main
jobs:
cd:
name: Handle Release and Deployment
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up UV Environment
uses: astral-sh/[email protected]
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Run Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
with:
github_token: '${{ secrets.GITHUB_TOKEN }}'
git_committer_name: 'MountainGod2'
git_committer_email: '[email protected]'
ssh_private_signing_key: '${{ secrets.GIT_COMMIT_SSH_PRIV_KEY }}'
ssh_public_signing_key: '${{ secrets.GIT_COMMIT_SSH_PUB_KEY }}'
- name: Publish to TestPyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: 'https://test.pypi.org/legacy/'
password: '${{ secrets.TEST_PYPI_API_TOKEN }}'
- name: Test Install from TestPyPI
if: steps.release.outputs.released == 'true'
run: |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple chaturbate-poller
- name: Publish to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: '${{ secrets.PYPI_API_TOKEN }}'
- name: Publish to GitHub Releases
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/upload-to-gh-release@main
with:
github_token: '${{ secrets.GITHUB_TOKEN }}'