Translated using Weblate (Bengali) #370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
on: [push] | |
jobs: | |
build: | |
name: MinGW build | |
runs-on: ubuntu-latest | |
container: | |
image: fedora:rawhide | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Set safe directory | |
run: | | |
dnf install -y git | |
git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
- uses: actions/[email protected] | |
- name: Update system | |
run: dnf -y update | |
- name: Install build dependencies | |
run: ./packaging/win32/mingwdeps.sh | |
- name: Version number | |
id: version_number | |
run: | | |
if [ ${{ startsWith(github.ref, 'refs/tags/') }} = true ]; then | |
VERSION=$(basename ${{ github.ref }}) | |
else | |
VERSION=ci-latest-$(basename ${{ github.ref }}) | |
fi | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
- name: Build application | |
run: | | |
./packaging/win32/makeinstaller.sh i686 qt5 nodebug ${{ steps.version_number.outputs.version }} | |
./packaging/win32/makeinstaller.sh x86_64 qt5 nodebug ${{ steps.version_number.outputs.version }} | |
./packaging/win32/makeinstaller.sh x86_64 gtk nodebug ${{ steps.version_number.outputs.version }} | |
- name: Reset ci-latest tag | |
run: | | |
VERSION=${{ steps.version_number.outputs.version }} | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github CI" | |
# Workaround for "could not read Username for 'https://github.com': No such device or address" | |
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git | |
git tag -d $VERSION || true | |
git push origin :$VERSION || true | |
git tag -m $VERSION $VERSION | |
git push --tags | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: startsWith(steps.version_number.outputs.version, 'ci-latest-') | |
- name: Create release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.version_number.outputs.version }} | |
release_name: CI Build | |
draft: false | |
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
- name: Upload qt5 i686 portable zip release asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: ./build/mingw32-qt5/gImageReader_${{ steps.version_number.outputs.version }}_qt5_i686_portable.zip | |
asset_name: gImageReader_latest_qt5_i686_portable.zip | |
overwrite: true | |
- name: Upload qt5 i686 installer release asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: ./build/mingw32-qt5/gImageReader_${{ steps.version_number.outputs.version }}_qt5_i686.exe | |
asset_name: gImageReader_latest_qt5_i686.exe | |
overwrite: true | |
- name: Upload qt5 x86_64 portable zip release asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: ./build/mingw64-qt5/gImageReader_${{ steps.version_number.outputs.version }}_qt5_x86_64_portable.zip | |
asset_name: gImageReader_latest_qt5_x86_64_portable.zip | |
overwrite: true | |
- name: Upload qt5 x86_64 installer release asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: ./build/mingw64-qt5/gImageReader_${{ steps.version_number.outputs.version }}_qt5_x86_64.exe | |
asset_name: gImageReader_latest_qt5_x86_64.exe | |
overwrite: true | |
- name: Upload gtk x86_64 portable zip release asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: ./build/mingw64-gtk/gImageReader_${{ steps.version_number.outputs.version }}_gtk_x86_64_portable.zip | |
asset_name: gImageReader_latest_gtk_x86_64_portable.zip | |
overwrite: true | |
- name: Upload gtk x86_64 installer release asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: ./build/mingw64-gtk/gImageReader_${{ steps.version_number.outputs.version }}_gtk_x86_64.exe | |
asset_name: gImageReader_latest_gtk_x86_64.exe | |
overwrite: true |