@@ -12,27 +12,37 @@ jobs:
1212
1313 steps :
1414 - name : Checkout
15- uses : actions/checkout@v2
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Python 3.9
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : " 3.9"
21+
22+ - name : Install dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ pip3 install poetry
1626
1727 - name : Bump version
1828 run : >-
19- bin/bump_version.py
29+ poetry version patch
30+
31+ - name : Get version
32+ id : get_version
33+ run : >-
34+ poetry version --short | sed 's/^/::set-output name=version::/'
2035
21- - name : Commit updated version.py
36+ - name : Commit updated version.
2237 id : commit_updated
2338 run : |
2439 git config --global user.name 'github-actions'
2540 git config --global user.email 'bot@noreply.github.com'
2641 git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
27- git add setup.py
28- git commit -m "bump version" && git push || echo "No changes to commit"
42+ git add pyproject.toml
43+ git commit -m "bump version to ${{ steps.get_version.outputs.version }} " && git push || echo "No changes to commit"
2944 git log -n 1 --pretty=format:"%H" | tail -n 1 | awk '{print "::set-output name=sha::"$0}'
3045
31- - name : Get version
32- id : get_version
33- run : >-
34- bin/show_version.py
35-
3646 - name : Create GitHub release
3747 uses : actions/create-release@v1
3848 id : create_release
@@ -42,31 +52,15 @@ jobs:
4252 prerelease : true
4353 release_name : Meshtastic Python ${{ steps.get_version.outputs.version }}
4454 tag_name : ${{ steps.get_version.outputs.version }}
55+ commitish : ${{ steps.commit_updated.outputs.sha }}
4556 body : |
4657 Autogenerated by github action, developer should edit as required before publishing...
4758 env :
4859 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4960
50- - name : Set up Python 3.9
51- uses : actions/setup-python@v2
52- with :
53- python-version : 3.9
54-
55- - name : Install pypa/build
56- run : >-
57- python -m
58- pip install
59- build
60- --user
61-
6261 - name : Build a binary wheel and a source tarball
6362 run : >-
64- python -m
65- build
66- --sdist
67- --wheel
68- --outdir dist/
69- .
63+ poetry build
7064
7165 - name : Publish to PyPI
7266 uses : pypa/gh-action-pypi-publish@master
@@ -79,14 +73,14 @@ jobs:
7973 # needs: release_create
8074 # steps:
8175 # - name: Checkout
82- # uses: actions/checkout@v3
76+ # uses: actions/checkout@v4
8377 # with:
8478 # ref: ${{ needs.release_create.outputs.new_sha }}
8579
8680 # - name: Set up Python 3.9
87- # uses: actions/setup-python@v2
81+ # uses: actions/setup-python@v5
8882 # with:
89- # python-version: 3.9
83+ # python-version: " 3.9"
9084
9185 # - name: Setup code signing
9286 # env:
@@ -125,21 +119,19 @@ jobs:
125119 needs : release_create
126120 steps :
127121 - name : Checkout
128- uses : actions/checkout@v3
122+ uses : actions/checkout@v4
129123 with :
130124 ref : ${{ needs.release_create.outputs.new_sha }}
131125
132126 - name : Set up Python 3.9
133- uses : actions/setup-python@v2
127+ uses : actions/setup-python@v5
134128 with :
135- python-version : 3.9
129+ python-version : " 3.9"
136130
137131 - name : Build
138132 run : |
139- pip install pyinstaller
140- pip install -r requirements.txt
141- pip install .
142- pyinstaller -F -n meshtastic --collect-all meshtastic meshtastic/__main__.py
133+ pip install poetry
134+ bin/build-bin.sh
143135
144136 - name : Add ubuntu to release
145137 uses : actions/upload-release-asset@v1
@@ -161,33 +153,31 @@ jobs:
161153 asset_name : readme.txt
162154 asset_content_type : text/plain
163155
164- build-and-publish-windows :
165- runs-on : windows-latest
166- needs : release_create
167- steps :
168- - name : Checkout
169- uses : actions/checkout@v3
170- with :
171- ref : ${{ needs.release_create.outputs.new_sha }}
156+ # build-and-publish-windows:
157+ # runs-on: windows-latest
158+ # needs: release_create
159+ # steps:
160+ # - name: Checkout
161+ # uses: actions/checkout@v4
162+ # with:
163+ # ref: ${{ needs.release_create.outputs.new_sha }}
172164
173- - name : Set up Python 3.9
174- uses : actions/setup-python@v2
175- with :
176- python-version : 3.9
165+ # - name: Set up Python 3.9
166+ # uses: actions/setup-python@v5
167+ # with:
168+ # python-version: " 3.9"
177169
178- - name : Build
179- run : |
180- pip install pyinstaller
181- pip install -r requirements.txt
182- pip install .
183- pyinstaller -F -n meshtastic --collect-all meshtastic meshtastic/__main__.py
170+ # - name: Build
171+ # run: |
172+ # pip install poetry
173+ # bin/build-bin.sh
184174
185- - name : Add windows to release
186- uses : actions/upload-release-asset@v1
187- env :
188- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
189- with :
190- upload_url : ${{ needs.release_create.outputs.upload_url }}
191- asset_path : dist/meshtastic.exe
192- asset_name : meshtastic_windows
193- asset_content_type : application/zip
175+ # - name: Add windows to release
176+ # uses: actions/upload-release-asset@v1
177+ # env:
178+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179+ # with:
180+ # upload_url: ${{ needs.release_create.outputs.upload_url }}
181+ # asset_path: dist/meshtastic.exe
182+ # asset_name: meshtastic_windows
183+ # asset_content_type: application/zip
0 commit comments