Skip to content

Commit db4a55f

Browse files
committed
新的程序包会将会使用更详细的名称
1 parent 797ad0a commit db4a55f

File tree

3 files changed

+38
-28
lines changed

3 files changed

+38
-28
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- uses: actions/setup-python@v5
5656
with:
57-
python-version: '3.11'
57+
python-version: "3.11"
5858
- uses: yezz123/setup-uv@v4
5959

6060
- name: Before script (Linux)
@@ -81,28 +81,35 @@ jobs:
8181
brew install create-dmg
8282
xattr -cr build/${{ env.APP_NAME }}.app
8383
./build-dmg.sh
84-
zip -r ${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}.zip build/${{ env.APP_NAME }}.app/
84+
mkdir -p release
85+
zip -r \
86+
release/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip \
87+
build/${{ env.APP_NAME }}.app/
8588
8689
- name: Package artifact (Linux)
8790
if: runner.os == 'Linux'
8891
run: |
89-
# mv ./build/App ./Package
90-
zip -r ${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}.zip ${{ env.APP_NAME }}/
92+
mv ./build/${{ env.APP_NAME }} ./build/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }}
93+
mkdir -p release
94+
zip -r \
95+
release/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip \
96+
build/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }}/
9197
9298
- name: Package artifact (Windows)
9399
if: runner.os == 'Windows'
94100
shell: pwsh
95101
run: |
96-
# Move-Item -Path ./build/App -Destination ./Package
97-
Compress-Archive -Path .\${{ env.APP_NAME }}\ -DestinationPath ${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}.zip
102+
Move-Item -Path ./build/${{ env.APP_NAME }}.exe -Destination ./build/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }}
103+
New-Item -ItemType Directory -Path release
104+
Compress-Archive -Path ./build/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }} `
105+
-DestinationPath ./release/${{ env.APP_NAME }}-${{ matrix.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip
98106
99107
- name: Upload artifact
100108
uses: actions/upload-artifact@v4
101109
with:
102110
name: App-${{ matrix.name }}-${{ matrix.arch }}
103111
path: |
104-
./${{ env.APP_NAME }}-*
105-
./*.dmg
112+
./release/*
106113
107114
build_whl:
108115
runs-on: ubuntu-latest
@@ -114,7 +121,7 @@ jobs:
114121

115122
- uses: actions/setup-python@v5
116123
with:
117-
python-version: '3.11'
124+
python-version: "3.11"
118125
- uses: yezz123/setup-uv@v4
119126

120127
- name: Setup, install dependencies, build

.gitlab-ci.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ check_version:
3131
rules:
3232
- changes:
3333
- app/**
34-
- tool/**
3534
script:
3635
- pip install uv
3736
- uv sync
@@ -47,13 +46,12 @@ check_version:
4746
- pip install uv
4847
- uv sync
4948
- uv run pyside-cli build --onedir
50-
- mv ./build/${APP_NAME} ./Package
5149
rules:
5250
- if: $CI_COMMIT_TAG
5351
artifacts:
5452
name: "build-${CI_COMMIT_SHA}"
5553
paths:
56-
- ./release/${APP_NAME}-*
54+
- ./release/*
5755
expire_in: 3 days
5856

5957
test_windows_x64:
@@ -84,16 +82,31 @@ build_whl:
8482
artifacts:
8583
name: "build-${CI_COMMIT_SHA}"
8684
paths:
87-
- ./release/*.whl
85+
- ./release/*
8886
expire_in: 3 days
8987

9088
build_windows_x64:
9189
extends: .build
9290
tags:
9391
- windows
9492
after_script:
93+
- Move-Item -Path ./build/${APP_NAME} -Destination ./build/${APP_NAME}-windows-x64-${CI_COMMIT_TAG}
9594
- New-Item -Path release -Type Directory
96-
- Compress-Archive -Path .\Package\ -DestinationPath .\release\${APP_NAME}-windows-x64.zip -CompressionLevel Optimal
95+
- Compress-Archive -Path ./build/${APP_NAME}-windows-x64-${CI_COMMIT_TAG}/ `
96+
-DestinationPath ./release/${APP_NAME}-windows-x64-${CI_COMMIT_TAG}.zip `
97+
-CompressionLevel Optimal
98+
99+
build_linux_x64:
100+
extends: .build
101+
image: reg.mikumikumi.xyz/mirror/python:3.11.13
102+
before_script:
103+
- apt-get update
104+
- apt-get install -y patchelf
105+
after_script:
106+
- mv ./build/${APP_NAME} ./build/${APP_NAME}-linux-x64-${CI_COMMIT_TAG}
107+
- mkdir -p release
108+
- tar -czf ./release/${APP_NAME}-linux-x64-${CI_COMMIT_TAG}.tar.gz \
109+
./build/${APP_NAME}-linux-x64-${CI_COMMIT_TAG}/
97110

98111
# build_macos_arm64:
99112
# stage: build
@@ -107,24 +120,14 @@ build_windows_x64:
107120
# - brew install create-dmg
108121
# - ./build-dmg.sh
109122
# - mkdir -p release
110-
# - mv ${APP_NAME}.dmg ./release/.
111-
# - zip -r "./release/${APP_NAME}-macos-arm64.zip" "${APP_NAME}.dmg"
123+
# - mv "${APP_NAME} Installer.dmg" ./release/.
124+
# - zip -r "./release/${APP_NAME}-macos-arm64-${CI_COMMIT_TAG}.zip" "${APP_NAME} Installer.dmg"
112125
# artifacts:
113126
# name: "build-${CI_COMMIT_SHA}"
114127
# paths:
115-
# - ./release/*.zip
128+
# - ./release/*
116129
# expire_in: 3 days
117130

118-
build_linux_x64:
119-
extends: .build
120-
image: reg.mikumikumi.xyz/mirror/python:3.11.13
121-
before_script:
122-
- apt-get update
123-
- apt-get install -y patchelf
124-
after_script:
125-
- mkdir release
126-
- tar -czf ./release/${APP_NAME}-linux-x64.tar.gz Package/
127-
128131
# bug: glab issues in private repositories
129132
# https://gitlab.com/gitlab-org/cli/-/issues/7859
130133
# https://gitlab.com/gitlab-org/gitlab/-/issues/568868

build-dmg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ create-dmg \
88
--window-size 600 400 \
99
--icon-size 100 \
1010
--app-drop-link 450 185 \
11-
${APP_NAME}.dmg ./build/${APP_NAME}.app
11+
"${APP_NAME} Installer.dmg" ./build/${APP_NAME}.app

0 commit comments

Comments
 (0)