Skip to content

add release ci

add release ci #1

Workflow file for this run

name: release
env:
PROJECT_NAME: qdl
REPO_NAME: linux-msm/qdl
REPO_REF: 672abb1e81cc630640f2a88e42b6dfd2a429ad14
DIST_DIR: dist
ARTIFACT_NAME: dist
on:
push:
tags:
- '*.*.*'
jobs:
build:
name: build (${{ matrix.config.os }}, ${{ matrix.config.arch }})
runs-on:
ubuntu-latest
permissions:
contents: read
strategy:
matrix:
config:
- os: Linux
arch: 64bit
cross_compile: x86_64-ubuntu16.04-linux-gnu
- os: Linux
arch: 32bit
cross_compile: i686-ubuntu16.04-linux-gnu
- os: Linux
arch: ARMv6
cross_compile: arm-linux-gnueabihf
- os: Linux
arch: ARM64
cross_compile: aarch64-linux-gnu
- os: macOS
arch: 64bit
cross_compile: x86_64-apple-darwin13
- os: Windows
arch: 32bit
cross_compile: i686-w64-mingw32
extension: .exe
container:
image: ghcr.io/arduino/crossbuild:0.3.0-pre.1
steps:
- name: Checkout avrdude-packing repository
uses: actions/checkout@v4
with:
path: packing
- name: Checkout linux-msm/qdl repository
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_NAME }}
ref: ${{ env.REPO_REF }}
path: ${{ env.PROJECT_NAME }}
- name: Apply patches
working-directory: ${{ env.PROJECT_NAME }}
run: git apply -v ../packing/patches/*.patch
- name: Build
run: /configure_toolchain.sh make -j$(nproc)
working-directory: ${{ env.PROJECT_NAME }}
env:
CROSS_COMPILE: ${{ matrix.config.cross_compile }}
- name: Package
run: |
tar -czvf ${{ env.PROJECT_NAME }}_${{ github.ref_name }}_${{ matrix.config.os }}_${{ matrix.config.arch }}.tar.gz qdl${{ matrix.config.extension }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }}
path: ${{ env.PROJECT_NAME }}_${{ github.ref_name }}_${{ matrix.config.os }}_${{ matrix.config.arch }}.tar.gz
create-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
pattern: ${{ env.ARTIFACT_NAME }}*
path: ${{ env.DIST_DIR }}
merge-multiple: true
- name: Create Github Release and upload artifacts
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
artifacts: "${{ env.DIST_DIR }}/*"