From d5fe0300cdf2fcf527a061f2b5d606e03db015df Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:52:28 +0100 Subject: [PATCH] add appimage action --- .github/workflows/make-release.yml | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/make-release.yml diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml new file mode 100644 index 0000000..e976f80 --- /dev/null +++ b/.github/workflows/make-release.yml @@ -0,0 +1,62 @@ +name: Make Release + +on: + push: + tags: + - 'v**' + +env: + APPDIR: WlxOverlay-S.AppDir + +jobs: + make_release: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Prepare Environment + run: | + sudo add-apt-repository -syn universe + sudo add-apt-repository -syn ppa:pipewire-debian/pipewire-upstream || sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 25088A0359807596 + sudo apt-get update + sudo apt-get install fuse cmake pkg-config fontconfig clang git wget curl libasound2-dev libxkbcommon-dev libopenxr-dev libfontconfig-dev libdbus-1-dev libpipewire-0.3-0 libpipewire-0.3-dev libspa-0.2-dev libx11-6 libxext6 libxrandr2 libx11-dev libxext-dev libxrandr-dev + rustup update + + test -f linuxdeploy-x86_64.AppImage || wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" + chmod +x linuxdeploy-x86_64.AppImage + + test -d ${APPDIR} && rm -rf ${APPDIR} + mkdir -p ${APPDIR}/usr/bin + + - name: Cargo Build + run: | + cargo build --release + mv target/release/wlx-overlay-s ${APPDIR}/usr/bin + chmod +x ${APPDIR}/usr/bin/wlx-overlay-s + + - name: Package AppImage + run: | + export VERSION=$GITHUB_REF_NAME + ./linuxdeploy-x86_64.AppImage -dAppRun.desktop -iWlxOverlay.png --appdir=${APPDIR} --output appimage --exclude-library '*libpipewire*' + mv WlxOverlay-S-$VERSION-x86_64.AppImage WlxOverlay-S-x86_64.AppImage + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }} + with: + tag_name: ${{ github.ref_name }} + release_name: WlxOverlay-S ${{ github.ref_name }} + draft: true + prerelease: false + + - name: Upload AppImage + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./WlxOverlay-S-x86_64.AppImage + asset_name: WlxOverlay-S-${{ github.ref_name }}-x86_64.AppImage + asset_content_type: application/octet-stream