Skip to content

Commit

Permalink
Nightly appImage reusing release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Feb 20, 2025
1 parent dcc53a8 commit 77ba72d
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 198 deletions.
109 changes: 108 additions & 1 deletion .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ on:
- '**.txt'
release:
types: [published]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
release_nightly:
description: Set to true to trigger the nightly build (will overwrite artifacts in the Nightly release!)
required: false
default: 'false'

env:
alire_index: ""
Expand Down Expand Up @@ -449,4 +456,104 @@ jobs:
upload_url: ${{ needs.release-info.outputs.upload-url }}
asset_path: alr.AppImage
asset_name: alr-${{ needs.release-info.outputs.version-without-v }}-x86_64.AppImage
asset_content_type: application/x-elf
asset_content_type: application/x-elf

###################
# release-nightly #
###################
# Run it when the pr name contains 'nightly'
release-nightly:
name: Nightly release on ${{ matrix.platform.id }}
if: >
github.event_name == 'schedule'
|| github.event.inputs.release_nightly != 'false'
|| contains(github.event.pull_request.title, 'nightly')
needs: [build, build-macos-universal, release-info]
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false
matrix:
platform:
- os: macos-13
id: x86_64-macos

- os: macos-latest
id: aarch64-macos

- os: macos-latest
id: universal-macos

- os: ubuntu-22.04
id: x86_64-linux

- os: ubuntu-24.04-arm
id: aaarch64-linux

- os: windows-latest
id: x86_64-windows

steps:

- name: Retrieve binary artifact
uses: actions/download-artifact@v4
with:
name: alr-bin-${{ matrix.platform.id }}.zip

- name: Install zip (Windows)
if: matrix.platform.os == 'windows-latest'
run: choco install zip

- name: Get date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Get metadata
run: |
touch alr-date-is-${{steps.date.outputs.date}}.txt
touch alr-commit-is-${{github.sha}}.txt
shell: bash

- name: Package binaries
run: zip alr-nightly-bin-${{matrix.platform.id}}.zip bin/alr* LICENSE.txt alr-*.txt

- name: Upload to release
uses: pyTooling/Actions/releaser/composite@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
alr-nightly-*.zip
tag: nightly
rm: false

############################
# release-nightly-appimage #
############################

release-nightly-appimage:
name: Nightly AppImage
if: >
github.event_name == 'schedule'
|| github.event.inputs.release_nightly != 'false'
|| contains(github.event.pull_request.title, 'nightly')
needs: [appimage]
runs-on: ubuntu-22.04

steps:

- name: Retrieve binary artifact
uses: actions/download-artifact@v4
with:
name: alr-${{needs.appimage.outputs.short_sha}}-x86_64.AppImage.zip

- name: Rename binary
run: mv alr.AppImage alr-nightly-x86_64.AppImage

- name: Upload to release
uses: pyTooling/Actions/releaser/composite@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly
rm: false
files: alr-nightly-x86_64.AppImage
197 changes: 0 additions & 197 deletions .github/workflows/nightly.yml

This file was deleted.

0 comments on commit 77ba72d

Please sign in to comment.