Skip to content

feat (github-deploy.yml): introduce sub-workflow to push nugets over … #10

feat (github-deploy.yml): introduce sub-workflow to push nugets over …

feat (github-deploy.yml): introduce sub-workflow to push nugets over … #10

Workflow file for this run

#
# https://docs.github.com/en/actions/migrating-to-github-actions/automated-migrations/migrating-from-azure-devops-with-github-actions-importer#environment-variable-mapping
#
name: Builder
env:
Build_Repository_Folderpath: ${{ github.workspace }}
on:
push:
branches:
- "**" # only trigger on branches not on tags
pull_request:
branches:
- "main"
- "develop"
jobs:
build:
runs-on: macos-14
# variable substitution is not supported in github at all so we cant do stuff like this
#
# env:
# Build_Artifacts_Folderpath: $Build_Repository_Folderpath/Artifacts
steps:
- name: '🔽 Checkout'
uses: 'actions/checkout@v3'
with:
fetch-depth: 1
- name: '🛠 Setup Build Environment'
run: ' chmod +x "$Build_Repository_Folderpath/Laerdal.SetupBuildEnvironment.sh" && "$Build_Repository_Folderpath/Laerdal.SetupBuildEnvironment.sh" '
shell: bash
- name: '🏗 📦 Build, Pack & Announce New Release (if appropriate)'
shell: bash
env:
Source_Branch_Fullpath: ${{ github.ref }}
Github_Repository_Path: ${{ github.repository }}
Components_Team_Github_Access_Token: ${{ secrets.components_team_github_access_token }}
run: |
cd "$Build_Repository_Folderpath" \
&& \
dotnet \
msbuild \
"Laerdal.McuMgr.Builder.targets" \
-m:1 \
-p:ShouldSkipMacCatalyst="false" \
\
-p:PackageOutputPath="$Build_Repository_Folderpath/Artifacts" \
-p:Laerdal_Gradle_Path="/opt/homebrew/opt/gradle@7/bin/gradle" \
-p:Laerdal_Source_Branch="$Source_Branch_Fullpath" \
-p:Laerdal_Repository_Path="$Github_Repository_Path" \
-p:Laerdal_Github_Access_Token="$Components_Team_Github_Access_Token" \
-p:Laerdal_Test_Results_Folderpath="$Build_Repository_Folderpath/TestResults"
- name: '📡 Publish Test Results' # https://github.com/marketplace/actions/publish-test-results
uses: EnricoMi/publish-unit-test-result-action/macos@v2
if: always()
with:
files: |
TestResults/**/TEST-*.xml
TestResults/**/TEST-*.trx
- name: '⬆️ Upload Artifacts' # to share with other workflows https://stackoverflow.com/a/77663335/863651
uses: actions/upload-artifact@v3
with:
name: 'nugets'
path: 'Artifacts/**/*.nupkg'