-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
247 additions
and
164 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: "Build" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
uses: timmo001/workflows/.github/workflows/build-python-linux.yml@master |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: "CodeQL" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 12 * * 4" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
jobs: | ||
codeql-analyze-python: | ||
uses: timmo001/workflows/.github/workflows/codeql-python.yml@master |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: "Dependabot - Auto-merge" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request_target: | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot-automerge: | ||
uses: timmo001/workflows/.github/workflows/dependabot-automerge-any.yml@master |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: "Dependency Review" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
- pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
uses: timmo001/workflows/.github/workflows/depedency-review.yml@master |
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,35 +1,116 @@ | ||
--- | ||
name: Deploy | ||
name: "Deploy" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_run: | ||
workflows: ["CI"] | ||
branches: [master] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
env: | ||
MODULE_NAME: aiolyric | ||
|
||
jobs: | ||
deploy: | ||
name: 🚀 Linux - Deploy Module | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
with: | ||
ref: "master" | ||
token: ${{ secrets.PUSH_TOKEN }} | ||
- name: 🏗 Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
python-version: "3.12" | ||
architecture: "x64" | ||
cache: "pip" | ||
- name: 🏗 Install setuptools, wheel, twine, click, twisted, incremental | ||
run: | | ||
python -m pip install --upgrade setuptools wheel twine click twisted incremental | ||
- name: 🔢 Get old version | ||
id: get-version-old | ||
run: | | ||
python -m pip install . | ||
# Read version from _version.py | ||
result=$(python <<EOF | ||
from ${{ env.MODULE_NAME }}._version import __version__ | ||
print(__version__.public()) | ||
EOF | ||
) | ||
echo "version=$result" >> $GITHUB_OUTPUT | ||
- name: 🔢 Set correct vertion - Developement | ||
if: ${{ github.event_name != 'release' }} | ||
run: | | ||
# If version does not contain dev, add it | ||
if [[ ! "${{ steps.get-version-old.outputs.version }}" == *"dev"* ]]; then | ||
python -m incremental.update ${{ env.MODULE_NAME }} --dev | ||
fi | ||
- name: 🔢 Set correct vertion - Release | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
# If version contains dev*, remove it | ||
if [[ "${{ steps.get-version-old.outputs.version }}" == *"dev"* ]]; then | ||
NEW_VERSION=$(echo "${{ steps.get-version-old.outputs.version }}" | sed 's/.dev.*//') | ||
python -m incremental.update ${{ env.MODULE_NAME }} --newversion $NEW_VERSION | ||
fi | ||
- name: 🔢 Get current version | ||
id: get-version-current | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
result=$(python <<EOF | ||
from ${{ env.MODULE_NAME }}._version import __version__ | ||
print(__version__.public()) | ||
EOF | ||
) | ||
echo "version=$result" >> $GITHUB_OUTPUT | ||
- name: ⤵️ Pull latest changes from GitHub | ||
run: | | ||
git pull --ff | ||
- name: 🖊 Commit | ||
uses: stefanzweifel/[email protected] | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} | ||
with: | ||
commit_message: | | ||
Bump ${{ env.MODULE_NAME }} version to ${{ steps.get-version-current.outputs.version }} | ||
- name: 🏗 Install package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
- name: 🔢 Increment version - Developement | ||
if: ${{ github.event_name != 'release' }} | ||
run: | | ||
python -m incremental.update ${{ env.MODULE_NAME }} --dev | ||
- name: 🔢 Increment version - Release | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
python -m incremental.update ${{ env.MODULE_NAME }} --patch | ||
python -m incremental.update ${{ env.MODULE_NAME }} --dev | ||
- name: 🔢 Get new version | ||
id: get-version-new | ||
run: | | ||
result=$(python <<EOF | ||
from ${{ env.MODULE_NAME }}._version import __version__ | ||
print(__version__.public()) | ||
EOF | ||
) | ||
echo "version=$result" >> $GITHUB_OUTPUT | ||
- name: ⤵️ Pull latest changes from GitHub | ||
run: | | ||
git pull --ff | ||
- name: 🖊 Commit | ||
uses: stefanzweifel/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} | ||
with: | ||
commit_message: | | ||
Bump ${{ env.MODULE_NAME }} version to ${{ steps.get-version-new.outputs.version }} |
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,5 +1,5 @@ | ||
--- | ||
name: Sync labels | ||
name: "Sync labels" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
|
@@ -8,15 +8,10 @@ on: | |
- master | ||
paths: | ||
- .github/labels.yml | ||
schedule: | ||
- cron: "34 5 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
labels: | ||
name: ♻️ Sync labels | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/checkout@v4 | ||
- name: 🚀 Run Label Syncer | ||
uses: micnncim/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: timmo001/workflows/.github/workflows/labels.yml@master |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: "Lint" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-jsonlint: | ||
uses: timmo001/workflows/.github/workflows/lint-jsonlint.yml@master | ||
lint-markdown-links: | ||
uses: timmo001/workflows/.github/workflows/lint-markdown-links.yml@master | ||
lint-markdownlint: | ||
uses: timmo001/workflows/.github/workflows/lint-markdownlint.yml@master | ||
lint-prettier: | ||
uses: timmo001/workflows/.github/workflows/lint-prettier.yml@master | ||
with: | ||
file-types: "{json,yml,yaml}" | ||
lint-pylint: | ||
uses: timmo001/workflows/.github/workflows/lint-pylint.yml@master | ||
with: | ||
module-name: aiolyric | ||
lint-ruff: | ||
uses: timmo001/workflows/.github/workflows/lint-ruff.yml@master | ||
lint-yamllint: | ||
uses: timmo001/workflows/.github/workflows/lint-yamllint.yml@master |
This file was deleted.
Oops, something went wrong.
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,18 +1,13 @@ | ||
--- | ||
name: Release Drafter | ||
name: "Release Drafter" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update_release_draft: | ||
name: ✏️ Draft release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🚀 Run Release Drafter | ||
uses: release-drafter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
release-drafter: | ||
uses: timmo001/workflows/.github/workflows/release-drafter.yml@master |
Oops, something went wrong.