-
Notifications
You must be signed in to change notification settings - Fork 40
52 lines (41 loc) · 1.18 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build and Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
packages: write
pull-requests: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Virtual Environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Install Dependencies
run: poetry install --with dev
- name: Package
run: poetry run pyinstaller --clean --noconfirm --log-level WARN cli.spec
- name: Rename
run: |
$tag = $env:GITHUB_REF -replace 'refs/tags/', ''
Get-ChildItem -Path dist | ForEach-Object {
Rename-Item -Path $_.FullName -NewName "$tag-$($_.Name)"
}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
generate_release_notes: true