Skip to content

Commit b73d3d0

Browse files
GCQ1217barry-ran
authored andcommitted
feat:修改github action ubuntu产物名称
1 parent 2f58d9f commit b73d3d0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/ubuntu.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ jobs:
101101
env:
102102
ENV_QT_PATH: ${{ github.workspace }}/Qt/${{ matrix.qt-ver }}
103103
run: |
104+
python3 ci/generate-version.py
104105
ci/linux/build_for_linux.sh "Release"
106+
- name: Get the version
107+
shell: bash
108+
id: get-version
109+
run: echo ::set-output name=version::${GITHUB_REF##*/}
105110
- name: Package AppImage
106111
shell: bash
107112
env:
@@ -112,7 +117,7 @@ jobs:
112117
- name: Upload AppImage Artifact
113118
uses: actions/upload-artifact@v4
114119
with:
115-
name: QtScrcpy-ubuntu-20.04-${{ matrix.qt-arch-install }}-AppImage
120+
name: ${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}-AppImage
116121
path: output/appimage/*.AppImage
117122
if-no-files-found: error
118123
- name: Prepare AppImage for Release
@@ -123,14 +128,14 @@ jobs:
123128
echo "Error: AppImage file not found"
124129
exit 1
125130
fi
126-
FINAL_NAME="QtScrcpy-ubuntu-20.04-${{ matrix.qt-arch-install }}.AppImage"
131+
FINAL_NAME="${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}.AppImage"
127132
cp "$APPIMAGE_FILE" "$FINAL_NAME"
128133
- name: Upload AppImage to Releases
129134
if: startsWith(github.ref, 'refs/tags/')
130135
uses: svenstaro/[email protected]
131136
with:
132-
file: QtScrcpy-ubuntu-20.04-${{ matrix.qt-arch-install }}.AppImage
133-
asset_name: QtScrcpy-ubuntu-20.04-${{ matrix.qt-arch-install }}.AppImage
137+
file: ${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}.AppImage
138+
asset_name: ${{ env.target-name }}-${{ env.plantform-des }}-${{ matrix.gcc-arch }}-${{ steps.get-version.outputs.version }}.AppImage
134139
repo_token: ${{ secrets.GITHUB_TOKEN }}
135140
tag: ${{ github.ref }}
136-
overwrite: true
141+
overwrite: true

0 commit comments

Comments
 (0)