bump version -> 3.0.0 #19
This file contains hidden or 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: Build and Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - main | |
| paths: | |
| - 'src/version.h' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.get_version.outputs.version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get version from version.h | |
| id: get_version | |
| run: | | |
| VERSION=$(grep 'ALG_WELCOME_VERSION "' src/version.h | sed 's/.*"\(.*\)".*/\1/') | |
| echo "version=v${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Install Qt6 and build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| qt6-base-dev \ | |
| cmake \ | |
| make \ | |
| g++ \ | |
| libgl1-mesa-dev | |
| - name: Configure CMake | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release .. | |
| - name: Build binary | |
| run: | | |
| cd build | |
| make -j$(nproc) | |
| - name: Strip binary | |
| run: | | |
| strip build/alg-welcome | |
| - name: Package artifacts | |
| run: | | |
| mkdir -p release | |
| cp build/alg-welcome release/ | |
| cp styles.qss release/ | |
| cp -r assets release/ | |
| cd release | |
| tar -czf alg-welcome-linux-x86_64.tar.gz alg-welcome styles.qss assets/ | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: alg-welcome-binary | |
| path: release/alg-welcome-linux-x86_64.tar.gz | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: alg-welcome-binary | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.build.outputs.version }} | |
| files: alg-welcome-linux-x86_64.tar.gz | |
| name: "ALG Welcome ${{ needs.build.outputs.version }}" | |
| body: | | |
| ## ALG Welcome Release ${{ needs.build.outputs.version }} | |
| ### What's Changed | |
| - Built with Qt6 and modern C++17 | |
| - Optimized with Link Time Optimization (LTO) | |
| ### Installation | |
| ```bash | |
| tar -xzf alg-welcome-linux-x86_64.tar.gz | |
| cd release | |
| sudo install -Dm755 alg-welcome /usr/local/bin/alg-welcome | |
| sudo install -Dm644 styles.qss /usr/local/share/alg-welcome/styles.qss | |
| sudo install -Dm644 assets/welcome.png /usr/local/share/pixmaps/welcome.png | |
| sudo install -Dm644 assets/welcome.desktop /usr/local/share/applications/welcome.desktop | |
| ``` | |
| ### Requirements | |
| - Qt6 Base (qt6-base on Arch Linux) | |
| - Arch-based distribution | |
| make_latest: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |