11name : release
2+
23on : [workflow_dispatch]
4+
35jobs :
46 release :
57 runs-on : ubuntu-latest
@@ -13,53 +15,59 @@ jobs:
1315 outputs :
1416 version : ${{ steps.release.outputs.version }}
1517 steps :
16- - name : ' Checkout sources'
17- uses : actions/checkout@v3
18+ - name : Checkout sources
19+ uses : actions/checkout@v4
1820 with :
1921 fetch-depth : 0
20- - name : ' Set up Python'
21- uses : actions/setup-python@v2
22- with :
23- python-version : ' 3.10'
24- - name : ' Set up Poetry'
25- uses : snok/install-poetry@v1
26- - name : ' Install dependencies'
27- run : poetry install --no-interaction --no-root
28- - name : ' Python Semantic Release'
22+
23+ - name : Install uv
24+ uses : astral-sh/setup-uv@v5
25+
26+ - name : Install dependencies
27+ run : uv sync --locked --dev
28+
29+ - name : Python Semantic Release
2930 id : release
3031 uses : relekang/python-semantic-release@master
3132 with :
3233 github_token : ${{ secrets.GITHUB_TOKEN }}
33- - name : ' Update checkout'
34+
35+ - name : Update checkout
3436 run : |
3537 git pull
3638 if : steps.release.outputs.released == 'true'
37- - name : ' Build distribution'
38- run : poetry build
39- - name : ' Publish to PyPI'
39+
40+ - name : Build distribution
41+ run : uv build
42+
43+ - name : Publish to PyPI
4044 uses : pypa/gh-action-pypi-publish@release/v1
4145 if : steps.release.outputs.released == 'true'
42- - name : ' Update files'
46+
47+ - name : Update files
4348 uses : MathieuSoysal/file-updater-for-release@v1.0.1
4449 with :
4550 files : README.md
4651 prefix : ' rev: '
4752 with-checkout : false
4853 version : ${{ steps.release.outputs.version }}
49- - name : ' Commit GitHub Action distribution'
54+
55+ - name : Commit GitHub Action distribution
5056 run : |
5157 git config --local user.email "action@github.com"
5258 git config --local user.name "GitHub Action"
5359 git add README.md
5460 git commit -m 'Update files' || true
55- - name : ' Push changes'
61+
62+ - name : Push changes
5663 uses : ad-m/github-push-action@master
5764 with :
5865 github_token : ${{ secrets.GITHUB_TOKEN }}
5966 branch : ${{ github.ref }}
6067 force : true
68+
6169 release_binaries :
62- name : ' Release binaries'
70+ name : Release binaries
6371 needs : release
6472 defaults :
6573 run :
@@ -71,40 +79,40 @@ jobs:
7179 - os : macos-latest
7280 TARGET : macos
7381 CMD_BUILD : |
74- poetry run pyinstaller \
82+ uv run pyinstaller \
7583 -n codelimit -F codelimit/__main__.py
7684 mv dist/codelimit dist/codelimit-macos
7785 OUT_FILE_NAME : dist/codelimit-macos
7886 - os : windows-latest
7987 TARGET : windows
8088 CMD_BUILD : |
81- poetry run pyinstaller \
89+ uv run pyinstaller \
8290 -n codelimit --onefile -c codelimit/__main__.py
8391 OUT_FILE_NAME : dist/codelimit.exe
8492 - os : ubuntu-22.04
8593 TARGET : linux
8694 CMD_BUILD : |
87- poetry run pyinstaller \
95+ uv run pyinstaller \
8896 -n codelimit -F codelimit/__main__.py
8997 mv dist/codelimit dist/codelimit-linux
9098 OUT_FILE_NAME : dist/codelimit-linux
9199 steps :
92- - name : ' Checkout sources'
93- uses : actions/checkout@v3
100+ - name : Checkout sources
101+ uses : actions/checkout@v4
94102 with :
95103 fetch-depth : 0
96104 ref : main
97- - name : ' Set up Python'
98- uses : actions/setup-python@v4
99- with :
100- python-version : ' 3.10'
101- - name : ' Install Poetry'
102- uses : snok/install-poetry@v1
103- - name : ' Install dependencies'
104- run : poetry install --no-interaction --no-root
105- - name : ' Build codelimit with pyinstaller for ${{matrix.TARGET}}'
105+
106+ - name : Install uv
107+ uses : astral-sh/setup-uv@v5
108+
109+ - name : Install dependencies
110+ run : uv sync --locked --dev
111+
112+ - name : Build codelimit with pyinstaller for ${{matrix.TARGET}}
106113 run : ${{matrix.CMD_BUILD}}
107- - name : ' Release'
114+
115+ - name : Release
108116 uses : softprops/action-gh-release@v1
109117 with :
110118 tag_name : ${{ format('v{0}', needs.release.outputs.version) }}
0 commit comments