mirror of
https://github.com/tsukumijima/libmali-rockchip.git
synced 2026-01-24 00:10:50 +01:00
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Build and Release Debian Package
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build_and_release:
|
|
name: Build and Release Debian Package
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
image:
|
|
- arm64v8/ubuntu
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: linux/arm64
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Cache Docker layers
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .github/workflows/
|
|
tags: ${{ matrix.image }}:build
|
|
build-args: IMAGE=${{ matrix.image }}:20.04
|
|
cache-from: type=gha,scope=${{ matrix.image }}
|
|
cache-to: type=gha,scope=${{ matrix.image }},mode=max
|
|
load: true
|
|
|
|
- name: Build
|
|
run: |
|
|
docker run --rm -i -v $(pwd):/work -w /work ${{ matrix.image }}:build bash -c 'debuild -us -uc -b && cp -a ../*.deb ./'
|
|
|
|
- name: Get version
|
|
id: get_version
|
|
run: |
|
|
echo "version=$(docker run --rm -i -v $(pwd):/work -w /work ${{ matrix.image }}:build bash -c 'dpkg-parsechangelog --show-field Version')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Get commit hash
|
|
id: get_commit_hash
|
|
uses: prompt/actions-commit-hash@v3
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: v${{ steps.get_version.outputs.version }}-${{ steps.get_commit_hash.outputs.short }}
|
|
tag_name: v${{ steps.get_version.outputs.version }}-${{ steps.get_commit_hash.outputs.short }}
|
|
generate_release_notes: true
|
|
files: |
|
|
./*.deb
|