-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Refactor and standardize workflows
- Loading branch information
1 parent
87a848b
commit 96101b5
Showing
3 changed files
with
38 additions
and
60 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,70 +3,63 @@ name: Continuous Deployment | |
on: | ||
workflow_run: | ||
workflows: ["Continuous Integration"] | ||
types: | ||
- completed | ||
types: [completed] | ||
|
||
env: | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
|
||
jobs: | ||
cd: | ||
name: CD - Release Deployment | ||
release: | ||
name: Release Deployment | ||
runs-on: ubuntu-latest | ||
concurrency: cd | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
permissions: | ||
id-token: write | ||
contents: write | ||
id-token: write | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: Setup | Checkout Repository at Workflow SHA | ||
- name: Setup | Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.sha }} | ||
|
||
- name: Setup | Force Correct Release Branch | ||
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }} | ||
|
||
- name: Setup | UV Environment | ||
- name: Setup | Configure UV Environment | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: uv.lock | ||
|
||
- name: Setup | Install and Sync Dependencies | ||
- name: Dependencies | Install and Sync Dependencies | ||
run: uv sync | ||
|
||
- name: Release | Run Python Semantic Release | ||
- name: Release | Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/python-semantic-release@v9 | ||
with: | ||
github_token: '${{ secrets.GH_PAT }}' | ||
github_token: ${{ secrets.GH_PAT }} | ||
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: Deploy | Publish to TestPyPI | ||
- name: Publish | PyPI Test | ||
if: steps.release.outputs.released == 'true' | ||
uses: pypa/[email protected] | ||
with: | ||
repository-url: 'https://test.pypi.org/legacy/' | ||
attestations: false | ||
|
||
- name: Deploy | Test Install from TestPyPI | ||
- name: Publish | PyPI Test Install | ||
if: steps.release.outputs.released == 'true' | ||
run: uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple chaturbate-poller | ||
|
||
- name: Deploy | Publish to PyPI | ||
- name: Publish | PyPI Release | ||
if: steps.release.outputs.released == 'true' | ||
uses: pypa/[email protected] | ||
with: | ||
attestations: false | ||
|
||
- name: Deploy | Publish Release to GitHub | ||
- name: Publish | GitHub Release | ||
if: steps.release.outputs.released == 'true' | ||
uses: python-semantic-release/publish-action@v9 | ||
with: | ||
github_token: '${{ secrets.GH_PAT }}' | ||
github_token: ${{ secrets.GH_PAT }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
name: CodeQL Analysis | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Continuous Integration"] | ||
types: | ||
- completed | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
analyze: | ||
name: 'CodeQL Analysis - Python' | ||
name: CodeQL Analysis - Python | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
permissions: | ||
security-events: write | ||
actions: read | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Repository | ||
- name: Setup | Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
- name: Setup | Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: 'python' | ||
build-mode: 'none' | ||
|
||
- name: Perform CodeQL Analysis | ||
- name: Analyze | Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: '/language:python' |