1- name : Stable Release
1+ name : Publish Stable Release
2+
23on :
3- push :
4- branches : [master]
54 workflow_dispatch :
5+ push :
6+ branches : [master, main]
7+
8+ permissions :
9+ contents : write # required for version bump commit and release tag
610
711jobs :
812 publish_stable :
9- uses : TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master
10- secrets : inherit
13+ if : github.actor != 'github-actions[bot]'
14+ uses : OpenVoiceOS/gh-automations/.github/workflows/publish-stable.yml@dev
15+ secrets :
16+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
17+ MATRIX_TOKEN : ${{ secrets.MATRIX_TOKEN }}
1118 with :
12- branch : ' master'
1319 version_file : ' nebulento/version.py'
14- setup_py : ' setup.py '
20+ publish_pypi : true
1521 publish_release : true
16-
17- publish_pypi :
18- needs : publish_stable
19- if : success() # Ensure this job only runs if the previous job succeeds
20- runs-on : ubuntu-latest
21- steps :
22- - uses : actions/checkout@v2
23- with :
24- ref : dev
25- fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
26- - name : Setup Python
27- uses : actions/setup-python@v1
28- with :
29- python-version : 3.8
30- - name : Install Build Tools
31- run : |
32- python -m pip install build wheel
33- - name : version
34- run : echo "::set-output name=version::$(python setup.py --version)"
35- id : version
36- - name : Build Distribution Packages
37- run : |
38- python setup.py sdist bdist_wheel
39- - name : Publish to PyPI
40- uses : pypa/gh-action-pypi-publish@master
41- with :
42- password : ${{secrets.PYPI_TOKEN}}
43-
44-
45- sync_dev :
46- needs : publish_stable
47- if : success() # Ensure this job only runs if the previous job succeeds
48- runs-on : ubuntu-latest
49- steps :
50- - uses : actions/checkout@v2
51- with :
52- fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
53- ref : master
54- - name : Push master -> dev
55- uses : ad-m/github-push-action@master
56- with :
57- github_token : ${{ secrets.GITHUB_TOKEN }}
58- branch : dev
22+ sync_dev : true
23+ notify_matrix : true
0 commit comments