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: Download, unzip, test & package latest AirConnect release | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
deployments: write | |
contents: write | |
statuses: write | |
actions: read | |
steps: | |
- uses: actions/[email protected] | |
with: | |
path: '.' | |
- name: Get latest AirConnect release | |
id: get_release | |
uses: robinraju/[email protected] | |
with: | |
repository: "philippe44/AirConnect" | |
latest: true | |
tarBall: false | |
zipBall: false | |
fileName: "AirConnect*.zip" | |
out-file-path: "src/dsm7/bin" | |
extract: true | |
- name: Test downloaded Release | |
id: test_release | |
run: | | |
RELEASE_VERSION=${{ steps.get_release.outputs.tag_name }} | |
RELEASE_FILES=${{ fromJson(steps.get_release.outputs.downloaded_files)[0] }} | |
echo "Using AirConnect version '${RELEASE_VERSION}'" | |
echo "Using downloaded file: '${RELEASE_FILES}'" | |
ls -ltR ${GITHUB_WORKSPACE}/src/dsm7/bin/ | |
- name: Running shellcheck | |
id: check_code | |
run: cd ${GITHUB_WORKSPACE}/src/dsm7; make shellcheck | |
- name: Test packaging of x86_64 architecture | |
id: test_packaging | |
run: cd ${GITHUB_WORKSPACE}/src/dsm7; RELEASE_VERSION=${{ steps.get_release.outputs.tag_name }} ARCH=x86_64 make build | |
- name: Test packaging of ALL architectures | |
id: create_packages | |
run: cd ${GITHUB_WORKSPACE}/src/dsm7; RELEASE_VERSION=${{ steps.get_release.outputs.tag_name }} make build-all | |
- name: Cleanup target | |
id: clean_target | |
run: cd ${GITHUB_WORKSPACE}/src/dsm7; make clean | |
- name: Check dist | |
id: check_created_packages | |
run: ls -ltR ${GITHUB_WORKSPACE}/src/dsm7/dist/ | |
- name: Upload releases to artifacts | |
id: upload_releases | |
uses: actions/upload-artifact@v4 | |
with: | |
name: releases | |
path: src/dsm7/dist/ | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Cleanup dist | |
id: clean_dist | |
run: cd ${GITHUB_WORKSPACE}/src/dsm7; make clean-dist |