Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Release

Release #11

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
ci_run_id:
description: "Run ID of the desired CI run to download artifacts from"
required: true
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Download artifacts
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yaml
workflow_conclusion: success
run_id: ${{ github.event.inputs.ci_run_id }}
path: artifacts
skip_unpack: true
- name: Extract source package
run: |
cd artifacts
unzip -j srcpkg.zip 'magiskboot_*-src.tar.xz'
file magiskboot_*-src.tar.xz
rm -f srcpkg.zip
- name: Clean up old releases
uses: dev-drprasad/[email protected]
with:
keep_latest: 0
delete_tags: true
delete_tag_pattern: last-ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for 3s
run: |
# prevent github to think our release already exists and create us a draft
sleep 3
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Last CI build
target_commitish: main
tag_name: last-ci
draft: false
prerelease: false
fail_on_unmatched_files: true
files: |
artifacts/magiskboot_*-src.tar.xz
artifacts/*.zip