Updated CMakeLists.txt #40
Workflow file for this run
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 Converseen AppImage | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| tags: | |
| - '**' | |
| workflow_dispatch: | |
| env: | |
| APPIMAGE_DIR: package/AppImage | |
| jobs: | |
| build-appimage: | |
| name: "${{ matrix.name }} (${{ matrix.arch }})" | |
| runs-on: ${{ matrix.runs-on }} | |
| outputs: | |
| output_version: ${{ steps.converseen-version.outputs.version }} | |
| strategy: | |
| matrix: | |
| include: | |
| - runs-on: ubuntu-latest | |
| name: Build AppImage | |
| arch: x86_64 | |
| - runs-on: ubuntu-24.04-arm | |
| name: Build AppImage | |
| arch: aarch64 | |
| container: | |
| image: ghcr.io/pkgforge-dev/archlinux:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get Converseen Version Number | |
| id: converseen-version | |
| run: | | |
| file_content=$(<package/AppImage/build/PKGBUILD) | |
| VERSION=$(echo "$file_content" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Version: $VERSION" | |
| - name: Create builder user | |
| run: | | |
| pacman -Sy --noconfirm shadow sudo base-devel | |
| # useradd -m -u 1000 -s /bin/bash builder | |
| useradd -m builder | |
| echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
| chown -Rv builder:builder $GITHUB_WORKSPACE | |
| - name: Get dependencies | |
| run: | | |
| cd $APPIMAGE_DIR | |
| chmod +x ./get-dependencies.sh && ./get-dependencies.sh | |
| - name: Install Custom ImageMagick | |
| run: | | |
| cd $APPIMAGE_DIR | |
| chmod +x ./build-imagemagick.sh && ./build-imagemagick.sh | |
| - name: Build Converseen | |
| run: | | |
| cd $APPIMAGE_DIR/build | |
| sudo -u builder makepkg -si --noconfirm | |
| - name: Make AppImage | |
| run: | | |
| cd "$APPIMAGE_DIR" | |
| chmod +x ./*-appimage.sh && ./*-appimage.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: AppImage-${{ matrix.arch }} | |
| path: ${{ env.APPIMAGE_DIR }}/dist | |
| release: | |
| name: GitHub Release | |
| needs: | |
| - build-appimage | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Converseen | |
| uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| name: AppImage-x86_64 | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| name: AppImage-aarch64 | |
| - name: Get Previous tag | |
| id: previoustag | |
| uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
| with: | |
| fallback: "v${{ needs.build-appimage.outputs.output_version }}" | |
| - name: Publish Release | |
| uses: softprops/action-gh-release@v2.2.2 | |
| with: | |
| tag_name: "${{ steps.previoustag.outputs.tag }}" | |
| prerelease: false | |
| draft: false | |
| generate_release_notes: false | |
| fail_on_unmatched_files: false | |
| make_latest: true | |
| files: | | |
| *.AppImage* | |
| sf-release: | |
| name: Sourceforge Release | |
| needs: | |
| - build-appimage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| name: AppImage-x86_64 | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| name: AppImage-aarch64 | |
| - name: Known Hosts | |
| id: known-hosts | |
| run: | | |
| SF_HOSTS=$(ssh-keyscan -H frs.sourceforge.net) | |
| echo "known-hosts=$SF_HOSTS" >> $GITHUB_OUTPUT | |
| - name: Install SSH key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SF_SSH_KEY }} | |
| known_hosts: ${{ steps.known-hosts.outputs.known-hosts }} | |
| if_key_exists: fail # replace / ignore / fail; optional (defaults to fail) | |
| - name: rsync over SSH | |
| id: rsync | |
| run: | | |
| c_ver=${{ needs.build-appimage.outputs.output_version }} | |
| v_dir=$(echo "$c_ver" | grep -oE '^[0-9]+\.[0-9]+') | |
| c_target=$(echo $(ls Converseen-*x86_64.AppImage)) | |
| echo "target-file=$c_target" >> $GITHUB_OUTPUT | |
| rsync -r *.AppImage ${{ secrets.SF_USERHOST }}:"${{ secrets.SF_PATH }}/Converseen $v_dir/" | |
| - name: Set Platform | |
| run: | | |
| c_ver=${{ needs.build-appimage.outputs.output_version }} | |
| c_target=${{ steps.rsync.outputs.target-file }} | |
| v_dir=$(echo "$c_ver" | grep -oE '^[0-9]+\.[0-9]+') | |
| c_url=https://sourceforge.net/projects/converseen/files/Converseen/Converseen%20${v_dir}/$c_target | |
| echo "url: $c_url" | |
| curl -H "Accept: application/json" -X PUT -d "default=linux" -d "api_key=${{ secrets.SF_API_KEY }}" $c_url |