mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Deb package - fix version number
This commit is contained in:
parent
4eacb3eb6e
commit
2b03bab7dc
29
.github/workflows/linux-package.yml
vendored
29
.github/workflows/linux-package.yml
vendored
@ -7,7 +7,30 @@ on:
|
||||
- feature/linux-ci
|
||||
|
||||
jobs:
|
||||
version:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version-number: ${{ steps.get-version.outputs.version-number }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get Version String
|
||||
id: get-version
|
||||
shell: pwsh
|
||||
run: |
|
||||
$MidnightUtc = [DateTime]::UtcNow.Date
|
||||
$BranchName = "${{ github.ref_name }}".replace('/','-').replace('.','-')
|
||||
$ApiVersion = (Select-Xml -Path 'src/Artemis.Core/Artemis.Core.csproj' -XPath '//PluginApiVersion').Node.InnerText
|
||||
$NumberOfCommitsToday = (git log --after=$($MidnightUtc.ToString("o")) --oneline | Measure-Object -Line).Lines
|
||||
$VersionNumber = "$ApiVersion.$($MidnightUtc.ToString("yyyy.MMdd")).$NumberOfCommitsToday"
|
||||
# If we're not in master, add the branch name to the version so it counts as prerelease
|
||||
if ($BranchName -ne "master") { $VersionNumber += "-$BranchName" }
|
||||
"version-number=$VersionNumber" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
package:
|
||||
needs: version
|
||||
name: Package deb
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -27,7 +50,7 @@ jobs:
|
||||
- name: Install dotnet deb
|
||||
run: dotnet tool install --global dotnet-deb
|
||||
- name: Publish Artemis
|
||||
run: dotnet publish --configuration Release --runtime linux-x64 --self-contained Artemis/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj
|
||||
run: dotnet publish --configuration Release -p:Version=${{ needs.version.outputs.version-number }} --runtime linux-x64 --self-contained Artemis/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj
|
||||
- name: Publish Plugins
|
||||
run: |
|
||||
New-Item -ItemType "Directory" -Path Artemis/src/Artemis.UI.Linux/bin/linux-x64/publish/Plugins
|
||||
@ -42,5 +65,5 @@ jobs:
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Artemis.UI.Linux.1.0.0.linux-x64.deb
|
||||
path: Artemis/src/Artemis.UI.Linux/bin/linux-x64/Artemis.UI.Linux.1.0.0.linux-x64.deb
|
||||
name: artemis-linux-x64-${{ needs.version.outputs.version-number }}.deb
|
||||
path: Artemis/src/Artemis.UI.Linux/bin/linux-x64/Artemis.UI.Linux.${{ needs.version.outputs.version-number }}.linux-x64.deb
|
||||
Loading…
x
Reference in New Issue
Block a user