Skip to content

Commit

Permalink
Add package step to build pipeline (#9)
Browse files Browse the repository at this point in the history
* Add package step to build pipeline

* Test new upload

* Fix build

* Add debug help

* Fix build

* Add debug

* Rename artifact
  • Loading branch information
Hekku2 authored Jun 30, 2024
1 parent beeaf7b commit 6725197
Show file tree
Hide file tree
Showing 2 changed files with 16 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 @@ -23,3 +23,17 @@ jobs:
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Package
id: package-zip
shell: pwsh
run: |
$archivePath = Join-Path -Path (Resolve-Path ".\").Path -ChildPath 'publish.zip'
./scripts/Build-Backend.ps1 -ZipPath $archivePath
echo "ARTIFACT_LOCATION=$archivePath" >> $env:GITHUB_OUTPUT
- name: Upload artifacts
env:
ARTIFACT_LOCATION: ${{ steps.package-zip.outputs.ARTIFACT_LOCATION }}
uses: actions/upload-artifact@v4
with:
name: DiscordImageSender
path: ${{ env.ARTIFACT_LOCATION }}
2 changes: 2 additions & 0 deletions scripts/Build-Backend.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Set-StrictMode -Version Latest
$project = 'src/FunctionApp.Isolated'
$publishFolder = 'bin/publish'

Write-Host "Building backend and packing it to $ZipPath..."

dotnet build --output $publishFolder $project --configuration Release

$fullSourcePath = (Resolve-Path "$publishFolder").Path
Expand Down

0 comments on commit 6725197

Please sign in to comment.