simplify if #12
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 | |
name: Publish Alpha Build ...aX | |
on: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- 'ovos_messagebus/version.py' | |
- 'test/**' | |
- 'examples/**' | |
- '.github/**' | |
- '.gitignore' | |
- 'LICENSE' | |
- 'CHANGELOG.md' | |
- 'MANIFEST.in' | |
- 'readme.md' | |
- 'scripts/**' | |
workflow_dispatch: | |
jobs: | |
update_version: | |
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master | |
with: | |
release_type: "alpha" | |
version_file: ovos_messagebus/version.py | |
alpha_var: VERSION_ALPHA | |
build_var: VERSION_BUILD | |
minor_var: VERSION_MINOR | |
major_var: VERSION_MAJOR | |
update_changelog: True | |
branch: dev | |
build_and_publish: | |
runs-on: ubuntu-latest | |
needs: update_version | |
steps: | |
- 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${{ needs.update_version.outputs.version }} | |
release_name: Release ${{ needs.update_version.outputs.version }} | |
body: | | |
Changes in this Release | |
${{ needs.update_version.outputs.changelog }} | |
draft: false | |
prerelease: true | |
commitish: dev | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
ref: dev | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Build Distribution Packages | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{secrets.PYPI_TOKEN}} | |
build_and_publish_docker: | |
needs: build_and_publish | |
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master | |
secrets: inherit |