Skip to content

Updated version for the next release #152

Updated version for the next release

Updated version for the next release #152

Workflow file for this run

name: C/C++ CI
on:
workflow_dispatch:
push:
pull_request:
jobs:
build-debian-amd64:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: bullseye
image: midwan/amiberry-debian-x86_64:bullseye
artifact_name: amiberry-lite-debian-bullseye-amd64
release_name: debian-bullseye-amd64
- name: bookworm
image: midwan/amiberry-debian-x86_64:bookworm
artifact_name: amiberry-lite-debian-bookworm-amd64
release_name: debian-bookworm-amd64
- name: trixie
image: midwan/amiberry-debian-x86_64:trixie
artifact_name: amiberry-lite-debian-trixie-amd64
release_name: debian-trixie-amd64
steps:
- uses: actions/checkout@v4
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.image }}
options: -v ${{ github.workspace }}:/build
run: |
cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr && cmake --build build -j4
cpack -G DEB --config build/CPackConfig.cmake
- name: Upload artifact
if: always() && github.ref_type != 'tag'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: "amiberry-lite_*.deb"
- name: ZIP package for release
if: github.ref_type == 'tag'
run: zip -r "amiberry-lite-${{ github.ref_name }}-${{ matrix.release_name }}.zip" amiberry-lite_*.deb
- name: Upload artifact for release
if: github.ref_type == 'tag'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: amiberry-lite-*.zip
build-debian-arm64:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: bullseye
image: midwan/amiberry-debian-aarch64:bullseye
artifact_name: amiberry-lite-debian-bullseye-arm64
release_name: debian-bullseye-arm64
- name: bookworm
image: midwan/amiberry-debian-aarch64:bookworm
artifact_name: amiberry-lite-debian-bookworm-arm64
release_name: debian-bookworm-arm64
- name: trixie
image: midwan/amiberry-debian-aarch64:trixie
artifact_name: amiberry-lite-debian-trixie-arm64
release_name: debian-trixie-arm64
steps:
- uses: actions/checkout@v4
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.image }}
options: -v ${{ github.workspace }}:/build
run: |
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-aarch64-linux-gnu.cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr && cmake --build build -j4
cpack -G DEB --config build/CPackConfig.cmake
- name: Upload artifact
if: github.ref_type != 'tag'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: "amiberry-lite_*.deb"
- name: ZIP package for release
if: github.ref_type == 'tag'
run: zip -r amiberry-lite-${{ github.ref_name }}-${{ matrix.release_name }}.zip amiberry-lite_*.deb
- name: Upload artifact for release
if: always() && github.ref_type == 'tag'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: "amiberry-lite-*.zip"
build-debian-armhf:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: bullseye
image: midwan/amiberry-debian-armhf:bullseye
artifact_name: amiberry-lite-debian-bullseye-armhf
release_name: debian-bullseye-armhf
- name: bookworm
image: midwan/amiberry-debian-armhf:bookworm
artifact_name: amiberry-lite-debian-bookworm-armhf
release_name: debian-bookworm-armhf
- name: trixie
image: midwan/amiberry-debian-armhf:trixie
artifact_name: amiberry-lite-debian-trixie-armhf
release_name: debian-trixie-armhf
steps:
- uses: actions/checkout@v4
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.image }}
options: -v ${{ github.workspace }}:/build
run: |
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-arm-linux-gnueabihf.cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr && cmake --build build -j4
cpack -G DEB --config build/CPackConfig.cmake
- name: Upload artifact
if: always() && github.ref_type != 'tag'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: "amiberry-lite_*.deb"
- name: ZIP package for release
if: github.ref_type == 'tag'
run: zip -r amiberry-lite-${{ github.ref_name }}-${{ matrix.release_name }}.zip amiberry-lite_*.deb
- name: Upload artifact for release
if: github.ref_type == 'tag'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: "amiberry-lite-*.zip"
create-release:
needs: [build-debian-amd64, build-debian-armhf, build-debian-arm64]
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/checkout@v4
- name: Create Changelog
if: github.ref_type == 'tag'
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R artifacts
- name: Create Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
body: ${{ steps.changelog.outputs.changes }}
artifacts: |
artifacts/amiberry-*.zip
create-prerelease:
needs: [build-debian-amd64, build-debian-armhf, build-debian-arm64]
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'preview-v')
steps:
- uses: actions/checkout@v4
- name: Create Changelog
if: github.ref_type == 'tag'
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R artifacts
- name: Create PreRelease
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
prerelease: true
allowUpdates: true
omitBodyDuringUpdate: true
body: ${{ steps.changelog.outputs.changes }}
artifacts: |
artifacts/amiberry-*.zip