Continuous Deployment #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Deployment | |
on: | |
workflow_run: | |
workflows: ["Continuous Integration"] | |
types: | |
- completed | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
jobs: | |
cd: | |
name: Deploy Release | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
ref: main | |
- 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/[email protected] | |
with: | |
repository-url: 'https://test.pypi.org/legacy/' | |
- 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/[email protected] | |
- name: Publish to GitHub Releases | |
if: steps.release.outputs.released == 'true' | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: '${{ secrets.GITHUB_TOKEN }}' |