This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Publish Minor Release .X.0 #1
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 workflow will generate a distribution and upload it to PyPI | |
# This will always use the current `dev` branch code and push it to `master` | |
name: Publish Minor Release .X.0 | |
on: | |
workflow_dispatch: | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: dev | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- 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/[email protected] | |
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 Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{secrets.PYPI_TOKEN}} | |
- name: Send message to Matrix bots channel | |
id: matrix-chat-message | |
uses: fadenb/[email protected] | |
with: | |
homeserver: 'matrix.org' | |
token: ${{ secrets.MATRIX_TOKEN }} | |
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' | |
message: | | |
New ovos-config release! ${{ steps.version.outputs.version }} |