Dmitri Bogomolov
5247a51ba8
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.
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
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: 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.deb.outputs.asset_path }}
|
|
${{ steps.appimage.outputs.asset_path }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|