Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sevensolutions authored Oct 5, 2024
1 parent 602f97d commit dc8aba2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ jobs:
with:
dotnet-version: 8.0.x

# Extract and publish version
- name: extract version
run: |
Get-Content "./src/NomadIIS/PluginInfo.cs" | Select-String 'public static readonly string Version = "([0-9]+\.[0-9]+\.[0-9])";' | ForEach-Object {
$version = $_.Matches[0].Groups[1].Value
}
$version | Out-File -Path version -NoNewline
- name: Upload version
if: ${{ matrix.profile.artifactName == 'nomad_iis' }} # We only need to do this once
uses: actions/upload-artifact@v4
with:
name: version
path: ./version

# Publish the application
- name: Publish the application
run: dotnet publish "./src/NomadIIS/NomadIIS.csproj" /p:PublishProfile="./src/NomadIIS/Properties/PublishProfiles/${{ matrix.profile.publishProfile }}"
Expand Down

0 comments on commit dc8aba2

Please sign in to comment.