Build and attach deb package

This commit is contained in:
Mbucari 2023-01-10 18:44:29 -07:00 committed by Mbucari
parent 09118b1ddf
commit d64fb081a0
5 changed files with 61 additions and 3 deletions

39
.github/workflows/build-deb.yml vendored Normal file
View File

@ -0,0 +1,39 @@
# build-deb.yml
# Reusable workflow that builds the Linux Debian package.
---
name: build_deb
on:
workflow_call:
inputs:
version:
type: string
description: 'Version number'
required: true
env:
FILE_NAME: "Libation.${{ inputs.version }}-linux-chardonnay"
jobs:
build_deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: "${{ env.FILE_NAME }}.tar.gz"
- name: Build .deb
id: deb
run: |
chmod +x ./Source/targz2deb.sh
./Source/targz2deb.sh "${{ env.FILE_NAME }}.tar.gz" ${{ inputs.version }}
- name: Publish .deb
uses: actions/upload-artifact@v3
with:
name: ${{ env.FILE_NAME }}.deb
path: ${{ env.FILE_NAME }}.deb
if-no-files-found: error

View File

@ -15,6 +15,10 @@ on:
description: 'Skip running unit tests' description: 'Skip running unit tests'
required: false required: false
default: true default: true
outputs:
version:
description: "The Libation version number"
value: ${{ jobs.build.outputs.version }}
env: env:
DOTNET_CONFIGURATION: 'Release' DOTNET_CONFIGURATION: 'Release'
@ -23,6 +27,8 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
strategy: strategy:
matrix: matrix:
os: [Linux, MacOS] os: [Linux, MacOS]

View File

@ -15,6 +15,10 @@ on:
description: 'Skip running unit tests' description: 'Skip running unit tests'
required: false required: false
default: true default: true
outputs:
version:
description: "The Libation version number"
value: ${{ jobs.build.outputs.version }}
env: env:
DOTNET_CONFIGURATION: 'Release' DOTNET_CONFIGURATION: 'Release'
@ -23,6 +27,8 @@ env:
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
strategy: strategy:
matrix: matrix:
os: [Windows] os: [Windows]
@ -48,8 +54,7 @@ jobs:
if ("${{ inputs.version_override }}".length -gt 0) { if ("${{ inputs.version_override }}".length -gt 0) {
$version = "${{ inputs.version_override }}" $version = "${{ inputs.version_override }}"
} else { } else {
[xml]$appScaffolding = Get-Content -Path ./Source/AppScaffolding/AppScaffolding.csproj $version = (Select-Xml -Path "./Source/AppScaffolding/AppScaffolding.csproj" -XPath "/Project/PropertyGroup/Version").Node.InnerXML.Trim()
$version = $appScaffolding.Project.PropertyGroup.Version
} }
"version=$version" >> $env:GITHUB_OUTPUT "version=$version" >> $env:GITHUB_OUTPUT
@ -80,3 +85,4 @@ jobs:
name: ${{ steps.zip.outputs.artifact }}.zip name: ${{ steps.zip.outputs.artifact }}.zip
path: ./Source/bin/Publish/${{ steps.zip.outputs.artifact }}.zip path: ./Source/bin/Publish/${{ steps.zip.outputs.artifact }}.zip
if-no-files-found: error if-no-files-found: error

View File

@ -28,3 +28,10 @@ jobs:
with: with:
version_override: ${{ inputs.version_override }} version_override: ${{ inputs.version_override }}
run_unit_tests: ${{ inputs.run_unit_tests }} run_unit_tests: ${{ inputs.run_unit_tests }}
linux_deb:
needs: [linux]
uses: ./.github/workflows/build-deb.yml
with:
version: ${{ needs.linux.outputs.version }}

View File

@ -13,7 +13,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AAXClean.Codecs" Version="0.2.15" /> <PackageReference Include="AAXClean.Codecs" Version="0.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>