@@ -17,58 +17,68 @@ permissions:
1717 - ' patch'
1818
1919jobs :
20- # test:
21- # name: Build and test
22- # uses: ./.github/workflows/python-test.yaml
23- # secrets: inherit
20+ get_version :
21+ runs-on : ubuntu-latest
22+ outputs :
23+ new_version : ${{ steps.increment_version.outputs.new_version }}
24+ steps :
25+ - uses : actions/checkout@v4
26+ with :
27+ token : ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
2428
25- publish :
26- defaults :
27- run :
28- working-directory : impit-python
29- name : Publish
30- runs-on : ubuntu-latest
31- # needs: [test]
32- steps :
33- - uses : actions/checkout@v4
34- with :
35- token : ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
29+ - name : Use Python
30+ uses : actions/setup-python@v5
31+ with :
32+ python-version : 3.x
3633
37- - name : Use Python
38- uses : actions/setup-python@v5
39- with :
40- python-version : 3.x
34+ - name : Set up uv package manager
35+ uses : astral-sh/setup-uv@v5
4136
42- - name : Set up uv package manager
43- uses : astral-sh /setup-uv@v5
37+ - name : Use Node.js
38+ uses : actions /setup-node@v4
4439
45- - name : Use Node.js
46- uses : actions/setup-node@v4
40+ - name : Get current version
41+ id : get_version
42+ working-directory : impit-python
43+ run : |
44+ echo "current_version=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)" >> "$GITHUB_OUTPUT"
4745
48- - name : Get current version
49- id : get_version
50- working-directory : impit-python
51- run : |
52- echo "current_version =$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version )" >> "$GITHUB_OUTPUT"
46+ - name : Increment version
47+ id : increment_version
48+ working-directory : impit-python
49+ run : |
50+ echo "new_version =$(npx semver -i ${{ github.event.inputs.bump }} ${{ steps.get_version.outputs.current_version }} )" >> "$GITHUB_OUTPUT"
5351
54- - name : Increment version
55- id : increment_version
56- working-directory : impit-python
57- run : |
58- echo "new_version=$(npx semver -i ${{ github.event.inputs.bump }} ${{ steps.get_version .outputs.current_version }})" >> "$GITHUB_OUTPUT "
52+ - name : Set new version
53+ id : show_new_version
54+ working-directory : impit-python
55+ run : |
56+ echo "New version is ${{ steps.increment_version .outputs.new_version }}"
5957
60- - name : Show new version
61- id : show_new_version
62- working-directory : impit-python
63- run : |
64- echo "New version is ${{ steps.increment_version.outputs.new_version }}"
58+ test :
59+ needs : [get_version]
60+ name : Build and test
61+ uses : ./.github/workflows/python-test.yaml
62+ secrets : inherit
63+ with :
64+ version : ${{ needs.get_version.outputs.new_version }}
6565
66+ publish :
67+ defaults :
68+ run :
69+ working-directory : impit-python
70+ name : Publish
71+ runs-on : ubuntu-latest
72+ needs : [test]
73+ steps :
6674 - name : Download all artifacts
6775 uses : actions/download-artifact@v4
6876 with :
6977 path : impit-python/dist
70- run-id : 14217710491
71- github-token : ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
78+
79+ - name : Unzip artifacts
80+ run : |
81+ unzip -o impit-python/dist/*.zip -d impit-python/dist
7282
7383 - name : List files
7484 run : |
0 commit comments