From d64fb081a0aa21d98c5dd770a4d4de5ee2edd0ba Mon Sep 17 00:00:00 2001
From: Mbucari <37587114+Mbucari@users.noreply.github.com>
Date: Tue, 10 Jan 2023 18:44:29 -0700
Subject: [PATCH] Build and attach deb package
---
.github/workflows/build-deb.yml | 39 +++++++++++++++++++++++++
.github/workflows/build-linux.yml | 6 ++++
.github/workflows/build-windows.yml | 10 +++++--
.github/workflows/build.yml | 7 +++++
Source/AaxDecrypter/AaxDecrypter.csproj | 2 +-
5 files changed, 61 insertions(+), 3 deletions(-)
create mode 100644 .github/workflows/build-deb.yml
diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml
new file mode 100644
index 00000000..22841801
--- /dev/null
+++ b/.github/workflows/build-deb.yml
@@ -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
diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml
index 3c0d1401..73ce24dd 100644
--- a/.github/workflows/build-linux.yml
+++ b/.github/workflows/build-linux.yml
@@ -15,6 +15,10 @@ on:
description: 'Skip running unit tests'
required: false
default: true
+ outputs:
+ version:
+ description: "The Libation version number"
+ value: ${{ jobs.build.outputs.version }}
env:
DOTNET_CONFIGURATION: 'Release'
@@ -23,6 +27,8 @@ env:
jobs:
build:
runs-on: ubuntu-latest
+ outputs:
+ version: ${{ steps.get_version.outputs.version }}
strategy:
matrix:
os: [Linux, MacOS]
diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml
index 8739bb6f..4ed0364a 100644
--- a/.github/workflows/build-windows.yml
+++ b/.github/workflows/build-windows.yml
@@ -15,6 +15,10 @@ on:
description: 'Skip running unit tests'
required: false
default: true
+ outputs:
+ version:
+ description: "The Libation version number"
+ value: ${{ jobs.build.outputs.version }}
env:
DOTNET_CONFIGURATION: 'Release'
@@ -23,6 +27,8 @@ env:
jobs:
build:
runs-on: windows-latest
+ outputs:
+ version: ${{ steps.get_version.outputs.version }}
strategy:
matrix:
os: [Windows]
@@ -48,8 +54,7 @@ jobs:
if ("${{ inputs.version_override }}".length -gt 0) {
$version = "${{ inputs.version_override }}"
} else {
- [xml]$appScaffolding = Get-Content -Path ./Source/AppScaffolding/AppScaffolding.csproj
- $version = $appScaffolding.Project.PropertyGroup.Version
+ $version = (Select-Xml -Path "./Source/AppScaffolding/AppScaffolding.csproj" -XPath "/Project/PropertyGroup/Version").Node.InnerXML.Trim()
}
"version=$version" >> $env:GITHUB_OUTPUT
@@ -80,3 +85,4 @@ jobs:
name: ${{ steps.zip.outputs.artifact }}.zip
path: ./Source/bin/Publish/${{ steps.zip.outputs.artifact }}.zip
if-no-files-found: error
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7b62f1b1..47e89f80 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -28,3 +28,10 @@ jobs:
with:
version_override: ${{ inputs.version_override }}
run_unit_tests: ${{ inputs.run_unit_tests }}
+
+ linux_deb:
+ needs: [linux]
+ uses: ./.github/workflows/build-deb.yml
+ with:
+ version: ${{ needs.linux.outputs.version }}
+
diff --git a/Source/AaxDecrypter/AaxDecrypter.csproj b/Source/AaxDecrypter/AaxDecrypter.csproj
index 5724667b..aaf8882c 100644
--- a/Source/AaxDecrypter/AaxDecrypter.csproj
+++ b/Source/AaxDecrypter/AaxDecrypter.csproj
@@ -13,7 +13,7 @@
-
+