Skip to content

Commit

Permalink
Merge branch 'feat/appimage' into release/2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Oct 19, 2023
2 parents cc64f1a + 8818578 commit 3a399f7
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ on:
jobs:

build:
name: CI on Linux
name: AppImage preparation for Linux

# Oldest supported by GitHub to increase AppImage back-compatibility
runs-on: ubuntu-20.04
# Oldest supported by Alire+GitHub to increase AppImage back-compatibility
# Unfortunately we depend on the static elaboration model of recent GNATs
runs-on: ubuntu-22.04

steps:
- name: Check out repository
Expand All @@ -26,9 +27,7 @@ jobs:
submodules: true

- name: Install FSF toolchain
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild
run: sudo apt-get install -y gnat gprbuild

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
Expand All @@ -50,15 +49,22 @@ jobs:
path: testsuite/out

- name: Retrieve upload URL for the release
if: (github.event_name == 'release')
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Get release version
if: (github.event_name == 'release')
id: get_version
uses: battila7/get-version-action@v2

- name: Get ref version
if: (github.event_name != 'release')
id: get_ref
run: echo "::set-output name=short_sha::$(echo ${{ github.sha }} | cut -c1-8)"

############
# AppImage #
############
Expand All @@ -70,25 +76,21 @@ jobs:
sudo apt-get install -y libfuse2
- name: Install AppImage's linuxdeploy
if: (github.event_name == 'release')
uses: miurahr/install-linuxdeploy-action@v1
with:
plugins: appimage

- name: Copy license into AppImage
if: (github.event_name == 'release')
run: |
mkdir -p AppDir
cp LICENSE.txt AppDir/
- name: Create AppImage
if: (github.event_name == 'release')
run: >
linuxdeploy-x86_64.AppImage --appdir AppDir -e bin/alr
-d resources/alr.desktop -i resources/alr.png --output appimage
- name: Rename AppImage
if: (github.event_name == 'release')
run: mv alr*AppImage alr.AppImage

- name: Upload AppImage asset
Expand All @@ -104,10 +106,10 @@ jobs:

# When not a release we upload as a plain artifact, just to make sure that
# this works as expected. Also this way the AppImage is available for
# regular PRs.
# regular PRs for easy testing.
- name: Upload as artifact (when not a release)
if: (github.event_name != 'release')
uses: actions/upload-artifact@v2
with:
name: alr-${{ steps.get_version.outputs.version-without-v }}-x86_64.AppImage
name: alr-${{ steps.get_ref.outputs.short_sha }}-x86_64.AppImage.zip
path: alr.AppImage

0 comments on commit 3a399f7

Please sign in to comment.