Skip to content

Commit 6c5bc20

Browse files
committed
CI: use ncipollo/[email protected]
1 parent b37cca5 commit 6c5bc20

File tree

1 file changed

+18
-75
lines changed

1 file changed

+18
-75
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,14 @@ jobs:
1414
dnf install -y git
1515
git config --global --add safe.directory ${GITHUB_WORKSPACE}
1616
17-
- uses: actions/checkout@v3.3.0
17+
- uses: actions/checkout@v4.2.2
1818

1919
- name: Update system
2020
run: dnf -y update
2121

2222
- name: Install build dependencies
2323
run: ./packaging/win32/mingwdeps.sh
2424

25-
- name: Version number
26-
id: version_number
27-
run: |
28-
if [ ${{ startsWith(github.ref, 'refs/tags/') }} = true ]; then
29-
VERSION=$(basename ${{ github.ref }})
30-
else
31-
VERSION=ci-latest-$(basename ${{ github.ref }})
32-
fi
33-
echo "version=${VERSION}" >> $GITHUB_OUTPUT
34-
3525
- name: Build application
3626
run: |
3727
PATH=/usr/bin ./packaging/win32/makeinstaller.sh i686 qt6 nodebug ${{ steps.version_number.outputs.version }}
@@ -43,77 +33,30 @@ jobs:
4333
VERSION=${{ steps.version_number.outputs.version }}
4434
git config --global user.email "[email protected]"
4535
git config --global user.name "Github CI"
46-
# Workaround for "could not read Username for 'https://github.com': No such device or address"
47-
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git
48-
git tag -d $VERSION || true
49-
git push origin :$VERSION || true
50-
git tag -m $VERSION $VERSION
36+
git tag -d ci-latest || true
37+
git push origin :ci-latest || true
38+
git tag -m ci-latest ci-latest
5139
git push --tags
5240
env:
5341
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
if: startsWith(steps.version_number.outputs.version, 'ci-latest-')
5542

5643
- name: Create release
5744
id: create_release
58-
uses: actions/create-release@v1.1.4
45+
uses: ncipollo/release-action@v1.18.0
5946
env:
6047
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6148
with:
62-
tag_name: ${{ steps.version_number.outputs.version }}
63-
release_name: CI Build
49+
allowUpdates: true
50+
tag: ci-latest
51+
name: CI Build
6452
draft: false
65-
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
66-
67-
- name: Upload qt6 i686 portable zip release asset
68-
uses: svenstaro/upload-release-action@v2
69-
with:
70-
repo_token: ${{ secrets.GITHUB_TOKEN }}
71-
tag: ${{ github.ref }}
72-
file: ./build/mingw32-qt6/gImageReader_${{ steps.version_number.outputs.version }}_qt6_i686_portable.zip
73-
asset_name: gImageReader_latest_qt6_i686_portable.zip
74-
overwrite: true
75-
76-
- name: Upload qt6 i686 installer release asset
77-
uses: svenstaro/upload-release-action@v2
78-
with:
79-
repo_token: ${{ secrets.GITHUB_TOKEN }}
80-
tag: ${{ github.ref }}
81-
file: ./build/mingw32-qt6/gImageReader_${{ steps.version_number.outputs.version }}_qt6_i686.exe
82-
asset_name: gImageReader_latest_qt6_i686.exe
83-
overwrite: true
84-
85-
- name: Upload qt6 x86_64 portable zip release asset
86-
uses: svenstaro/upload-release-action@v2
87-
with:
88-
repo_token: ${{ secrets.GITHUB_TOKEN }}
89-
tag: ${{ github.ref }}
90-
file: ./build/mingw64-qt6/gImageReader_${{ steps.version_number.outputs.version }}_qt6_x86_64_portable.zip
91-
asset_name: gImageReader_latest_qt6_x86_64_portable.zip
92-
overwrite: true
93-
94-
- name: Upload qt6 x86_64 installer release asset
95-
uses: svenstaro/upload-release-action@v2
96-
with:
97-
repo_token: ${{ secrets.GITHUB_TOKEN }}
98-
tag: ${{ github.ref }}
99-
file: ./build/mingw64-qt6/gImageReader_${{ steps.version_number.outputs.version }}_qt6_x86_64.exe
100-
asset_name: gImageReader_latest_qt6_x86_64.exe
101-
overwrite: true
102-
103-
- name: Upload gtk x86_64 portable zip release asset
104-
uses: svenstaro/upload-release-action@v2
105-
with:
106-
repo_token: ${{ secrets.GITHUB_TOKEN }}
107-
tag: ${{ github.ref }}
108-
file: ./build/mingw64-gtk/gImageReader_${{ steps.version_number.outputs.version }}_gtk_x86_64_portable.zip
109-
asset_name: gImageReader_latest_gtk_x86_64_portable.zip
110-
overwrite: true
111-
112-
- name: Upload gtk x86_64 installer release asset
113-
uses: svenstaro/upload-release-action@v2
114-
with:
115-
repo_token: ${{ secrets.GITHUB_TOKEN }}
116-
tag: ${{ github.ref }}
117-
file: ./build/mingw64-gtk/gImageReader_${{ steps.version_number.outputs.version }}_gtk_x86_64.exe
118-
asset_name: gImageReader_latest_gtk_x86_64.exe
119-
overwrite: true
53+
prerelease: true
54+
replacesArtifacts: true
55+
artifacts: "
56+
./build/mingw32-qt6/gImageReader_*_qt6_i686_portable.zip,
57+
./build/mingw32-qt6/gImageReader_*_qt6_i686.exe,
58+
./build/mingw64-qt6/gImageReader_*_qt6_x86_64_portable.zip,
59+
./build/mingw64-qt6/gImageReader_*_qt6_x86_64.exe,
60+
./build/mingw64-gtk/gImageReader_*_gtk_x86_64_portable.zip,
61+
./build/mingw64-gtk/gImageReader_*_gtk_x86_64.exe
62+
"

0 commit comments

Comments
 (0)