Skip to content

Commit 03e1024

Browse files
committed
automations
1 parent 7958119 commit 03e1024

15 files changed

+615
-1
lines changed

.github/workflows/dev2master.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This workflow will generate a distribution and upload it to PyPI
2+
3+
name: Push dev -> master
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build_and_publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
14+
ref: dev
15+
- name: Push dev -> master
16+
uses: ad-m/github-push-action@master
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
branch: master

.github/workflows/install_tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Install Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- dev
7+
workflow_dispatch:
8+
9+
jobs:
10+
install:
11+
strategy:
12+
max-parallel: 2
13+
matrix:
14+
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Setup Python
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install Build Tools
23+
run: |
24+
python -m pip install build wheel
25+
- name: Install System Dependencies
26+
run: |
27+
sudo apt-get update
28+
sudo apt install python3-dev swig libssl-dev
29+
- name: Build Distribution Packages
30+
run: |
31+
python setup.py bdist_wheel
32+
- name: Install package
33+
run: |
34+
pip install .[all]

.github/workflows/notify_matrix.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Close Pull Request
2+
3+
# only trigger on pull request closed events
4+
on:
5+
pull_request:
6+
types: [ closed ]
7+
8+
jobs:
9+
merge_job:
10+
# this job will only run if the PR has been merged
11+
if: github.event.pull_request.merged == true
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Send message to Matrix bots channel
16+
id: matrix-chat-message
17+
uses: fadenb/matrix-chat-message@v0.0.6
18+
with:
19+
homeserver: 'matrix.org'
20+
token: ${{ secrets.MATRIX_TOKEN }}
21+
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org'
22+
message: |
23+
new ovos-config PR merged! https://github.com/OpenVoiceOS/ovos-config/pull/${{ github.event.number }}

.github/workflows/publish_alpha.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This workflow will generate a distribution and upload it to PyPI
2+
# This will always use the current `dev` branch code
3+
4+
name: Publish Alpha Build ...aX
5+
on:
6+
push:
7+
branches:
8+
- dev
9+
paths-ignore:
10+
- 'ovos_bus/version.py'
11+
- 'test/**'
12+
- 'examples/**'
13+
- '.github/**'
14+
- '.gitignore'
15+
- 'LICENSE'
16+
- 'CHANGELOG.md'
17+
- 'MANIFEST.in'
18+
- 'readme.md'
19+
- 'scripts/**'
20+
workflow_dispatch:
21+
22+
jobs:
23+
build_and_publish:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
ref: dev
29+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
30+
- name: Setup Python
31+
uses: actions/setup-python@v1
32+
with:
33+
python-version: 3.8
34+
- name: Install Build Tools
35+
run: |
36+
python -m pip install build wheel
37+
- name: Increment Version
38+
run: |
39+
VER=$(python setup.py --version)
40+
python scripts/bump_alpha.py
41+
- name: "Generate release changelog"
42+
uses: heinrichreimer/github-changelog-generator-action@v2.3
43+
with:
44+
token: ${{ secrets.GITHUB_TOKEN }}
45+
maxIssues: 50
46+
id: changelog
47+
- name: Commit to dev
48+
uses: stefanzweifel/git-auto-commit-action@v4
49+
with:
50+
commit_message: Increment Version
51+
branch: dev
52+
- name: version
53+
run: echo "::set-output name=version::$(python setup.py --version)"
54+
id: version
55+
- name: Create Release
56+
id: create_release
57+
uses: actions/create-release@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
60+
with:
61+
tag_name: V${{ steps.version.outputs.version }}
62+
release_name: Release ${{ steps.version.outputs.version }}
63+
body: |
64+
Changes in this Release
65+
${{ steps.changelog.outputs.changelog }}
66+
draft: false
67+
prerelease: true
68+
commitish: dev
69+
- name: Build Distribution Packages
70+
run: |
71+
python setup.py bdist_wheel
72+
- name: Publish to Test PyPI
73+
uses: pypa/gh-action-pypi-publish@master
74+
with:
75+
password: ${{secrets.PYPI_TOKEN}}

.github/workflows/publish_build.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# This workflow will generate a distribution and upload it to PyPI
2+
# This will always use the current `dev` branch code
3+
4+
name: Publish Build Release ..X
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build_and_publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
ref: dev
15+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
16+
- name: Setup Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.8
20+
- name: Install Build Tools
21+
run: |
22+
python -m pip install build wheel
23+
- name: Remove alpha (declare stable)
24+
run: |
25+
VER=$(python setup.py --version)
26+
python scripts/remove_alpha.py
27+
- name: "Generate release changelog"
28+
uses: heinrichreimer/github-changelog-generator-action@v2.3
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
id: changelog
32+
- name: Commit to dev
33+
uses: stefanzweifel/git-auto-commit-action@v4
34+
with:
35+
commit_message: Declare alpha stable
36+
branch: dev
37+
- name: Push dev -> master
38+
uses: ad-m/github-push-action@master
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
branch: master
42+
force: true
43+
- name: version
44+
run: echo "::set-output name=version::$(python setup.py --version)"
45+
id: version
46+
- name: Create Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
51+
with:
52+
tag_name: V${{ steps.version.outputs.version }}
53+
release_name: Release ${{ steps.version.outputs.version }}
54+
body: |
55+
Changes in this Release
56+
${{ steps.changelog.outputs.changelog }}
57+
draft: false
58+
prerelease: false
59+
commitish: dev
60+
- name: Build Distribution Packages
61+
run: |
62+
python setup.py bdist_wheel
63+
- name: Prepare next Build version
64+
run: echo "::set-output name=version::$(python setup.py --version)"
65+
id: alpha
66+
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0
67+
run: |
68+
VER=$(python setup.py --version)
69+
python scripts/bump_build.py
70+
- name: Commit to dev
71+
uses: stefanzweifel/git-auto-commit-action@v4
72+
with:
73+
commit_message: Prepare Next Version
74+
branch: dev
75+
- name: Publish to Test PyPI
76+
uses: pypa/gh-action-pypi-publish@master
77+
with:
78+
password: ${{secrets.PYPI_TOKEN}}
79+
- name: Send message to Matrix bots channel
80+
id: matrix-chat-message
81+
uses: fadenb/matrix-chat-message@v0.0.6
82+
with:
83+
homeserver: 'matrix.org'
84+
token: ${{ secrets.MATRIX_TOKEN }}
85+
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org'
86+
message: |
87+
New ovos-config release! ${{ steps.version.outputs.version }}

.github/workflows/publish_major.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# This workflow will generate a distribution and upload it to PyPI
2+
# This will always use the current `dev` branch code and push it to `master`
3+
4+
name: Publish Major Release X.0.0
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build_and_publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
ref: dev
15+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
16+
- name: Setup Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.8
20+
- name: Install Build Tools
21+
run: |
22+
python -m pip install build wheel
23+
- name: Remove alpha (declare stable)
24+
run: |
25+
VER=$(python setup.py --version)
26+
python scripts/remove_alpha.py
27+
- name: "Generate release changelog"
28+
uses: heinrichreimer/github-changelog-generator-action@v2.3
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
id: changelog
32+
- name: Commit to dev
33+
uses: stefanzweifel/git-auto-commit-action@v4
34+
with:
35+
commit_message: Declare alpha stable
36+
branch: dev
37+
- name: Push dev -> master
38+
uses: ad-m/github-push-action@master
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
branch: master
42+
force: true
43+
- name: version
44+
run: echo "::set-output name=version::$(python setup.py --version)"
45+
id: version
46+
- name: Create Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
51+
with:
52+
tag_name: V${{ steps.version.outputs.version }}
53+
release_name: Release ${{ steps.version.outputs.version }}
54+
body: |
55+
Changes in this Release
56+
${{ steps.changelog.outputs.changelog }}
57+
draft: false
58+
prerelease: false
59+
commitish: master
60+
- name: Build Distribution Packages
61+
run: |
62+
python setup.py bdist_wheel
63+
- name: Prepare next Major version
64+
run: echo "::set-output name=version::$(python setup.py --version)"
65+
id: alpha
66+
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0
67+
run: |
68+
VER=$(python setup.py --version)
69+
python scripts/bump_major.py
70+
- name: Commit to dev
71+
uses: stefanzweifel/git-auto-commit-action@v4
72+
with:
73+
commit_message: Prepare Next Version
74+
branch: dev
75+
- name: Publish to Test PyPI
76+
uses: pypa/gh-action-pypi-publish@master
77+
with:
78+
password: ${{secrets.PYPI_TOKEN}}
79+
- name: Send message to Matrix bots channel
80+
id: matrix-chat-message
81+
uses: fadenb/matrix-chat-message@v0.0.6
82+
with:
83+
homeserver: 'matrix.org'
84+
token: ${{ secrets.MATRIX_TOKEN }}
85+
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org'
86+
message: |
87+
New ovos-config release! ${{ steps.version.outputs.version }}

0 commit comments

Comments
 (0)