1- # This workflow will generate a distribution and upload it to PyPI
2-
3- name : Publish Alpha Build ...aX
1+ name : Stable Release
42on :
53 push :
6- branches :
7- - dev
8- paths-ignore :
9- - ' ovos_solver_aiml_plugin/version.py'
10- - ' test/**'
11- - ' examples/**'
12- - ' .github/**'
13- - ' .gitignore'
14- - ' LICENSE'
15- - ' CHANGELOG.md'
16- - ' MANIFEST.in'
17- - ' README.md'
18- - ' scripts/**'
4+ branches : [master]
195 workflow_dispatch :
206
217jobs :
22- build_and_publish :
8+ publish_stable :
9+ uses : TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master
10+ secrets : inherit
11+ with :
12+ branch : ' master'
13+ version_file : ' ovos-solver-plugin-aiml/version.py'
14+ setup_py : ' setup.py'
15+ publish_release : true
16+
17+ publish_pypi :
18+ needs : publish_stable
19+ if : success() # Ensure this job only runs if the previous job succeeds
2320 runs-on : ubuntu-latest
2421 steps :
2522 - uses : actions/checkout@v2
3330 - name : Install Build Tools
3431 run : |
3532 python -m pip install build wheel
36- - name : Increment Version
37- run : |
38- VER=$(python setup.py --version)
39- python scripts/bump_alpha.py
40- - name : " Generate release changelog"
41- uses : heinrichreimer/github-changelog-generator-action@v2.3
42- with :
43- token : ${{ secrets.GITHUB_TOKEN }}
44- id : changelog
45- - name : Commit to dev
46- uses : stefanzweifel/git-auto-commit-action@v4
47- with :
48- commit_message : Increment Version
49- branch : dev
5033 - name : version
5134 run : echo "::set-output name=version::$(python setup.py --version)"
5235 id : version
@@ -63,10 +46,27 @@ jobs:
6346 ${{ steps.changelog.outputs.changelog }}
6447 draft : false
6548 prerelease : true
49+ commitish : dev
6650 - name : Build Distribution Packages
6751 run : |
6852 python setup.py sdist bdist_wheel
6953 - name : Publish to Test PyPI
7054 uses : pypa/gh-action-pypi-publish@master
7155 with :
72- password : ${{secrets.PYPI_TOKEN}}
56+ password : ${{secrets.PYPI_TOKEN}}
57+
58+
59+ sync_dev :
60+ needs : publish_stable
61+ if : success() # Ensure this job only runs if the previous job succeeds
62+ runs-on : ubuntu-latest
63+ steps :
64+ - uses : actions/checkout@v2
65+ with :
66+ fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
67+ ref : master
68+ - name : Push master -> dev
69+ uses : ad-m/github-push-action@master
70+ with :
71+ github_token : ${{ secrets.GITHUB_TOKEN }}
72+ branch : dev
0 commit comments