Skip to content

Commit

Permalink
chore: release automations
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray committed Oct 20, 2024
1 parent f50832e commit aeda977
Show file tree
Hide file tree
Showing 13 changed files with 390 additions and 76 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/auto_translate.yml

This file was deleted.

63 changes: 54 additions & 9 deletions .github/workflows/publish_alpha.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This workflow will generate a distribution and upload it to PyPI
name: Publish Alpha Build ...aX
on:
push:
Expand All @@ -14,15 +15,59 @@ on:
- "MANIFEST.in"
- "README.md"
- "scripts/**"
- "translations/**"
workflow_dispatch:

jobs:
build_and_publish:
uses: openvoiceos/.github/.github/workflows/publish_alpha_release.yml@feat/shared_actions1
secrets: inherit
with:
version_file: version.py # File location of the version file, default: version.py
python_version: "3.10"
locale_folder: locale
update_intentfile: test/test_intents.yaml
changelog_file: CHANGELOG.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Increment Version
run: |
VER=$(python setup.py --version)
python scripts/bump_alpha.py
- name: "Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
maxIssues: 50
id: changelog
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Increment Version
branch: dev
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: true
commitish: dev
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
84 changes: 84 additions & 0 deletions .github/workflows/publish_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# This workflow will generate a distribution and upload it to PyPI
name: Publish Build Release ..X
on:
workflow_dispatch:
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Remove alpha (declare stable)
run: |
VER=$(python setup.py --version)
python scripts/remove_alpha.py
- name: "Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: changelog
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Declare alpha stable
branch: dev
- name: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
commitish: dev
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Prepare next Build version
run: echo "::set-output name=version::$(python setup.py --version)"
id: alpha
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0
run: |
VER=$(python setup.py --version)
python scripts/bump_build.py
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Prepare Next Version
branch: dev
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
- name: Send message to Matrix bots channel
id: matrix-chat-message
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: "matrix.org"
token: ${{ secrets.MATRIX_TOKEN }}
channel: "!WjxEKjjINpyBRPFgxl:krbel.duckdns.org"
message: |
New skill-ovos-fallback-unknown release! ${{ steps.version.outputs.version }}
84 changes: 84 additions & 0 deletions .github/workflows/publish_major.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# This workflow will generate a distribution and upload it to PyPI
name: Publish Major Release X.0.0
on:
workflow_dispatch:
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Remove alpha (declare stable)
run: |
VER=$(python setup.py --version)
python scripts/remove_alpha.py
- name: "Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: changelog
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Declare alpha stable
branch: dev
- name: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
commitish: master
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Prepare next Major version
run: echo "::set-output name=version::$(python setup.py --version)"
id: alpha
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0
run: |
VER=$(python setup.py --version)
python scripts/bump_major.py
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Prepare Next Version
branch: dev
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
- name: Send message to Matrix bots channel
id: matrix-chat-message
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: "matrix.org"
token: ${{ secrets.MATRIX_TOKEN }}
channel: "!WjxEKjjINpyBRPFgxl:krbel.duckdns.org"
message: |
New skill-ovos-fallback-unknown release! ${{ steps.version.outputs.version }}
84 changes: 84 additions & 0 deletions .github/workflows/publish_minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# This workflow will generate a distribution and upload it to PyPI
name: Publish Minor Release .X.0
on:
workflow_dispatch:
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Remove alpha (declare stable)
run: |
VER=$(python setup.py --version)
python scripts/remove_alpha.py
- name: "Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: changelog
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Declare alpha stable
branch: dev
- name: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
commitish: master
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Prepare next Minor version
run: echo "::set-output name=version::$(python setup.py --version)"
id: alpha
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0
run: |
VER=$(python setup.py --version)
python scripts/bump_minor.py
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Prepare Next Version
branch: dev
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
- name: Send message to Matrix bots channel
id: matrix-chat-message
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: "matrix.org"
token: ${{ secrets.MATRIX_TOKEN }}
channel: "!WjxEKjjINpyBRPFgxl:krbel.duckdns.org"
message: |
New skill-ovos-fallback-unknown release! ${{ steps.version.outputs.version }}
15 changes: 0 additions & 15 deletions .github/workflows/publish_release.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/pull-request-lint.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/test_resources.yml

This file was deleted.

Loading

0 comments on commit aeda977

Please sign in to comment.