Merge branch 'ci-release' into ci

This commit is contained in:
Dmitri Bogomolov 2022-02-23 18:12:26 +02:00
commit 062715ff29
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
3 changed files with 103 additions and 0 deletions

64
.github/workflows/appimage.yml vendored Normal file
View File

@ -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 }}

39
.github/workflows/winebuild.yml vendored Normal file
View File

@ -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 }}