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 diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml new file mode 100644 index 00000000..0d9e02d5 --- /dev/null +++ b/.github/workflows/appimage.yml @@ -0,0 +1,64 @@ +name: AppImage build + +on: + push: + pull_request: + branches: 'v0.6' + +jobs: + build-appimage: + + 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: | + 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 + id: deb + run: | + python setup.py --command-packages=stdeb.command bdist_deb + echo "::set-output name=asset_path::deb_dist/*.deb" + - name: Build AppImage + id: appimage + 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 + 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 + with: + prerelease: true + tag_name: continuous + target_commitish: ${{ github.sha }} + body_path: body.txt + append_body: true + files: | + ${{ steps.deb.outputs.asset_path }} + ${{ steps.appimage.outputs.asset_path }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/winebuild.yml b/.github/workflows/winebuild.yml new file mode 100644 index 00000000..09dd0006 --- /dev/null +++ b/.github/workflows/winebuild.yml @@ -0,0 +1,39 @@ +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 + id: build + 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 + with: + 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 }}