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.
This commit is contained in:
Dmitri Bogomolov 2021-06-29 14:34:47 +03:00
parent df62767126
commit 5247a51ba8
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -11,6 +11,21 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: 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 - uses: actions/checkout@v2
- name: Install apt dependencies - name: Install apt dependencies
run: | run: |
@ -18,15 +33,24 @@ jobs:
build-essential libcap-dev libssl-dev python-all-dev \ build-essential libcap-dev libssl-dev python-all-dev \
debhelper dh-python python-stdeb debhelper dh-python python-stdeb
- name: Build deb - name: Build deb
id: deb
run: | run: |
python setup.py --command-packages=stdeb.command bdist_deb python setup.py --command-packages=stdeb.command bdist_deb
echo "::set-output name=asset_path::deb_dist/*.deb"
- name: Build AppImage - name: Build AppImage
run: buildscripts/appimage.sh id: appimage
- uses: actions/upload-artifact@v2 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: with:
name: deb prerelease: true
path: deb_dist/*.deb tag_name: continuous
- uses: actions/upload-artifact@v2 target_commitish: ${{ github.sha }}
with: files: |
name: AppImage ${{ steps.deb.outputs.asset_path }}
path: out/*.AppImage* ${{ steps.appimage.outputs.asset_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}