Add RPM stuff #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Linux packages | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- platform: "linux/amd64" | |
name: "amd64" | |
- platform: "linux/arm64" | |
name: "aarch64" | |
- platform: "linux/arm/v7" | |
name: "armhf" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Compile | |
run: | | |
docker buildx build \ | |
-f Dockerfile \ | |
--platform ${{ matrix.platform }} \ | |
-o ${{ github.workspace }}/build \ | |
. | |
# - name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: gcfflasher-${{ matrix.name }} | |
# path: build/src/*.deb | |
- name: Upload binaries to release | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
release_name: ${{ github.ref_name }} | |
file: build/src/*_linux_* | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |