Skip to content

Commit

Permalink
Merge pull request #1 from mgrojo/mgrojo-action
Browse files Browse the repository at this point in the history
Action for building and uploading a self-generated AppImage
  • Loading branch information
mgrojo authored Mar 11, 2024
2 parents 6ee1130 + 532dcf6 commit 5e984a7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Build using Alire.
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions: write-all

jobs:
build:
name: CI on ${{ matrix.os }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: ada-actions/toolchain
uses: ada-actions/toolchain@ce2021
with:
distrib: community
target: native
- name: alire-project/setup-alire
uses: alire-project/setup-alire@v2
- name: Update apt
if: runner.os == 'Linux'
run: sudo apt-get update
- name: Update
run: alr index --update-all
- name: Build
run: alr --non-interactive build

release:
name: Continuous AppImage
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: ada-actions/toolchain
uses: ada-actions/toolchain@ce2021
with:
distrib: community
target: native
- name: alire-project/setup-alire
uses: alire-project/setup-alire@v2
with:
branch: "master"
- name: Update apt
run: sudo apt-get update
- name: Update
run: alr index --update-all
- name: Build
run: alr --non-interactive build
- name: Build AppImage
run: VERSION=$(printf "dev-`git -C . rev-parse --short HEAD`") bin/alr_appimage
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: alr_appimage*.AppImage
2 changes: 1 addition & 1 deletion alire.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ maintainers-logins = ["mgrojo"]

executables = ["alr_appimage"]
[[depends-on]]
ada_toml = "~0.4.0"
ada_toml = "^0.3.0"

[[depends-on]]
spoon = "^1.0.1"
Expand Down

0 comments on commit 5e984a7

Please sign in to comment.