From df6276712690bd5104ffc78c3877cef3c20f0d6d Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sun, 27 Jun 2021 19:59:14 +0300 Subject: [PATCH 1/8] Add appimage build workflow using buildscripts/appimage.sh --- .github/workflows/appimage.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/appimage.yml diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml new file mode 100644 index 00000000..0c27c671 --- /dev/null +++ b/.github/workflows/appimage.yml @@ -0,0 +1,32 @@ +name: AppImage build + +on: + push: + pull_request: + branches: 'v0.6' + +jobs: + build-appimage: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Install apt dependencies + run: | + sudo apt-get install -yq --no-install-suggests --no-install-recommends \ + build-essential libcap-dev libssl-dev python-all-dev \ + debhelper dh-python python-stdeb + - name: Build deb + run: | + python setup.py --command-packages=stdeb.command bdist_deb + - name: Build AppImage + run: buildscripts/appimage.sh + - uses: actions/upload-artifact@v2 + with: + name: deb + path: deb_dist/*.deb + - uses: actions/upload-artifact@v2 + with: + name: AppImage + path: out/*.AppImage* From 5247a51ba84ee7277cc7785712a5163957552bf8 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 29 Jun 2021 14:34:47 +0300 Subject: [PATCH 2/8] Make continuous release: for every push into the ci branch it tries to remove previous 'continuous' tag, than newly built deb and appimage are published as a fresh continuous release and the tag 'continuous' is placed to current commit. Remove useless artifacts. --- .github/workflows/appimage.yml | 40 +++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 0c27c671..c88c385e 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -11,6 +11,21 @@ jobs: runs-on: ubuntu-18.04 steps: + - name: Remove prev tag + if: ${{ github.ref == 'refs/heads/ci' }} + uses: actions/github-script@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + try { + await github.git.deleteRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "tags/continuous" + }) + } catch (e) { + console.log("The continuous doesn't exist yet: " + e) + } - uses: actions/checkout@v2 - name: Install apt dependencies run: | @@ -18,15 +33,24 @@ jobs: build-essential libcap-dev libssl-dev python-all-dev \ debhelper dh-python python-stdeb - name: Build deb + id: deb run: | python setup.py --command-packages=stdeb.command bdist_deb + echo "::set-output name=asset_path::deb_dist/*.deb" - name: Build AppImage - run: buildscripts/appimage.sh - - uses: actions/upload-artifact@v2 + id: appimage + run: | + buildscripts/appimage.sh + echo "::set-output name=asset_path::out/*.AppImage*" + - name: Release Continuous + if: ${{ github.ref == 'refs/heads/ci' }} + uses: softprops/action-gh-release@master with: - name: deb - path: deb_dist/*.deb - - uses: actions/upload-artifact@v2 - with: - name: AppImage - path: out/*.AppImage* + prerelease: true + tag_name: continuous + target_commitish: ${{ github.sha }} + files: | + ${{ steps.deb.outputs.asset_path }} + ${{ steps.appimage.outputs.asset_path }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3b8cba0097d51a0ae96cc65bfb7289bb7950ca3a Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 29 Jun 2021 14:59:15 +0300 Subject: [PATCH 3/8] Add github workflow to build and upload exe --- .github/workflows/winebuild.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/winebuild.yml diff --git a/.github/workflows/winebuild.yml b/.github/workflows/winebuild.yml new file mode 100644 index 00000000..ae970120 --- /dev/null +++ b/.github/workflows/winebuild.yml @@ -0,0 +1,24 @@ +name: Build Windows 32bit exe + +on: + push: + pull_request: + branches: 'v0.6' + +jobs: + build-exe: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Install apt dependencies + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -yq --no-install-recommends \ + build-essential libcap-dev libssl-dev python-all-dev \ + wine-stable winetricks wine32 wine64 mingw-w64 xvfb + - name: Build + run: | + xvfb-run i386 buildscripts/winbuild.sh From d9433e408f8e72dfc36ed0db5e4d16243b226bde Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 29 Jun 2021 15:12:35 +0300 Subject: [PATCH 4/8] Add windows exe to the continuous release --- .github/workflows/winebuild.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/winebuild.yml b/.github/workflows/winebuild.yml index ae970120..7f695b2f 100644 --- a/.github/workflows/winebuild.yml +++ b/.github/workflows/winebuild.yml @@ -20,5 +20,17 @@ jobs: build-essential libcap-dev libssl-dev python-all-dev \ wine-stable winetricks wine32 wine64 mingw-w64 xvfb - name: Build + id: build run: | xvfb-run i386 buildscripts/winbuild.sh + echo "::set-output name=asset_path::packages/pyinstaller/dist/*.exe" + - name: Release Continuous + if: ${{ github.ref == 'refs/heads/ci' }} + uses: softprops/action-gh-release@master + with: + prerelease: true + tag_name: continuous + target_commitish: ${{ github.sha }} + files: ${{ steps.build.outputs.asset_path }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0d79b604b8a4fb4c7d671cd9c5613b560f01897e Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sat, 6 Nov 2021 16:53:51 +0200 Subject: [PATCH 5/8] The right place for the pull request template --- PULL_REQUEST_TEMPLATE.md => .github/PULL_REQUEST_TEMPLATE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename PULL_REQUEST_TEMPLATE.md => .github/PULL_REQUEST_TEMPLATE.md (100%) diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md From a1da2f89ddf576269a389e9691f651d709f80bf3 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 25 Jan 2022 17:53:33 +0200 Subject: [PATCH 6/8] Generate SHA256 checksums for deb and AppImage and embed them into release body. --- .github/workflows/appimage.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index c88c385e..cf749011 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -42,6 +42,10 @@ jobs: run: | buildscripts/appimage.sh echo "::set-output name=asset_path::out/*.AppImage*" + - name: Checksums + run: | + sha256sum ${{ steps.deb.outputs.asset_path }} >> checksum.txt + sha256sum ${{ steps.appimage.outputs.asset_path }} >> checksum.txt - name: Release Continuous if: ${{ github.ref == 'refs/heads/ci' }} uses: softprops/action-gh-release@master @@ -49,6 +53,7 @@ jobs: prerelease: true tag_name: continuous target_commitish: ${{ github.sha }} + body_path: checksum.txt files: | ${{ steps.deb.outputs.asset_path }} ${{ steps.appimage.outputs.asset_path }} From e6a2bfd4124e506229c366e9addb1407e1838253 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 25 Jan 2022 18:33:42 +0200 Subject: [PATCH 7/8] Try to add SHA256 checksum for windows exe into release body --- .github/workflows/winebuild.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/winebuild.yml b/.github/workflows/winebuild.yml index 7f695b2f..09dd0006 100644 --- a/.github/workflows/winebuild.yml +++ b/.github/workflows/winebuild.yml @@ -24,6 +24,7 @@ jobs: run: | xvfb-run i386 buildscripts/winbuild.sh echo "::set-output name=asset_path::packages/pyinstaller/dist/*.exe" + sha256sum ${{ steps.build.outputs.asset_path }} >> checksum.txt - name: Release Continuous if: ${{ github.ref == 'refs/heads/ci' }} uses: softprops/action-gh-release@master @@ -31,6 +32,8 @@ jobs: prerelease: true tag_name: continuous target_commitish: ${{ github.sha }} + body_path: checksum.txt + append_body: true files: ${{ steps.build.outputs.asset_path }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3817642dd8c3286095db937336f225bc7f41f392 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 25 Jan 2022 18:42:13 +0200 Subject: [PATCH 8/8] Format release body --- .github/workflows/appimage.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index cf749011..0d9e02d5 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -46,6 +46,8 @@ jobs: run: | sha256sum ${{ steps.deb.outputs.asset_path }} >> checksum.txt sha256sum ${{ steps.appimage.outputs.asset_path }} >> checksum.txt + cut -d '/' -f 2 checksum.txt >> body.txt + cut -d ' ' -f 1 checksum.txt >> body.txt - name: Release Continuous if: ${{ github.ref == 'refs/heads/ci' }} uses: softprops/action-gh-release@master @@ -53,7 +55,8 @@ jobs: prerelease: true tag_name: continuous target_commitish: ${{ github.sha }} - body_path: checksum.txt + body_path: body.txt + append_body: true files: | ${{ steps.deb.outputs.asset_path }} ${{ steps.appimage.outputs.asset_path }}