From 619cf7d2d56fad6ef94a2911afd7d797455768ec Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Fri, 25 Nov 2022 10:47:02 -0500 Subject: [PATCH 1/5] update description --- .github/workflows/build-process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-process.yml b/.github/workflows/build-process.yml index 9d0ef63..1c37ee8 100644 --- a/.github/workflows/build-process.yml +++ b/.github/workflows/build-process.yml @@ -35,7 +35,7 @@ jobs: - name: Restore tools run: dotnet tool restore working-directory: "${{env.CODE_LOCATION}}" - - name: Output Anticipated Version Number + - name: Set Version Number run: | VERSION=$(dotnet minver -t v -v e) echo "$VERSION" From 3ff0842a520bcddd949b8e67eadc7c67ea38ced3 Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Fri, 25 Nov 2022 10:47:49 -0500 Subject: [PATCH 2/5] put working-directory up top --- .github/workflows/build-process.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-process.yml b/.github/workflows/build-process.yml index 1c37ee8..764b990 100644 --- a/.github/workflows/build-process.yml +++ b/.github/workflows/build-process.yml @@ -36,17 +36,17 @@ jobs: run: dotnet tool restore working-directory: "${{env.CODE_LOCATION}}" - name: Set Version Number + working-directory: "${{env.CODE_LOCATION}}" run: | VERSION=$(dotnet minver -t v -v e) echo "$VERSION" echo "VERSION=$VERSION" >> $GITHUB_ENV - working-directory: "${{env.CODE_LOCATION}}" - name: Build - run: dotnet build -c Release --no-restore working-directory: "${{env.CODE_LOCATION}}" + run: dotnet build -c Release --no-restore - name: Test - run: dotnet test -c Release --no-build --verbosity normal working-directory: "${{env.CODE_LOCATION}}" + run: dotnet test -c Release --no-build --verbosity normal - name: Publish Single-File .EXEs working-directory: "${{env.CODE_LOCATION}}" run: | @@ -75,8 +75,8 @@ jobs: tar -cvf osx-x64_selfcontained.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/osx-x64/publish tar -cvf win-x64_selfcontained.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/win-x64/publish - name: Pack - run: dotnet pack -c Release --no-build --verbosity normal working-directory: "${{env.CODE_LOCATION}}/TFWhatsUp.Console" + run: dotnet pack -c Release --no-build --verbosity normal - name: Save Artifact if: github.ref == 'refs/heads/main' uses: actions/upload-artifact@v3 From e741fb5b429b7a9ec3190f5ab3f21352b7e3dbb8 Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Fri, 25 Nov 2022 10:57:51 -0500 Subject: [PATCH 3/5] use shortened locations --- .github/workflows/build-process.yml | 36 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-process.yml b/.github/workflows/build-process.yml index 764b990..08ebf0c 100644 --- a/.github/workflows/build-process.yml +++ b/.github/workflows/build-process.yml @@ -12,6 +12,10 @@ on: env: CODE_LOCATION: src/ + CONSOLE_PROJECT_LOCATION: src/TFWhatsUp.Console/ + RELEASE_LOCATION: src/TFWhatsUp.Console/bin/Release/net7.0/ + PUBLISH_COMMAND_FLAGS: "-c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc false" + PUBLISH_COMMAND_FLAGS_SC: "-c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc true" jobs: build: runs-on: ubuntu-latest @@ -50,30 +54,32 @@ jobs: - name: Publish Single-File .EXEs working-directory: "${{env.CODE_LOCATION}}" run: | - dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc false - dotnet publish -r osx-x64 -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc false - dotnet publish -r win-x64 -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc false + dotnet publish -r linux-x64 ${{env.PUBLISH_COMMAND_FLAGS}} + dotnet publish -r osx-x64 ${{env.PUBLISH_COMMAND_FLAGS}} + dotnet publish -r win-x64 ${{env.PUBLISH_COMMAND_FLAGS}} - name: ZIP Single-File .EXEs + working-directory: "${{env.CODE_LOCATION}}" run: | - tar -cvf linux-x64.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/linux-x64/publish - tar -cvf osx-x64.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/osx-x64/publish - tar -cvf win-x64.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/win-x64/publish + tar -cvf linux-x64.tar ${{env.RELEASE_LOCATION}}linux-x64/publish + tar -cvf osx-x64.tar ${{env.RELEASE_LOCATION}}osx-x64/publish + tar -cvf win-x64.tar ${{env.RELEASE_LOCATION}}win-x64/publish - name: Clear the publish directories run: | - rm -r ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/linux-x64/publish - rm -r ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/osx-x64/publish - rm -r ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/win-x64/publish + rm -rf ${{env.RELEASE_LOCATION}}linux-x64/publish + rm -rf ${{env.RELEASE_LOCATION}}osx-x64/publish + rm -rf ${{env.RELEASE_LOCATION}}win-x64/publish - name: Publish Self-Contained .EXEs working-directory: "${{env.CODE_LOCATION}}" run: | - dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc true - dotnet publish -r osx-x64 -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc true - dotnet publish -r win-x64 -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc true + dotnet publish -r linux-x64 ${{env.PUBLISH_COMMAND_FLAGS_SC}} + dotnet publish -r osx-x64 ${{env.PUBLISH_COMMAND_FLAGS_SC}} + dotnet publish -r win-x64 ${{env.PUBLISH_COMMAND_FLAGS_SC}} - name: ZIP Self-Contained .EXEs + working-directory: "${{env.CODE_LOCATION}}" run: | - tar -cvf linux-x64_selfcontained.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/linux-x64/publish - tar -cvf osx-x64_selfcontained.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/osx-x64/publish - tar -cvf win-x64_selfcontained.tar ${{env.CODE_LOCATION}}TFWhatsUp.Console/bin/Release/net7.0/win-x64/publish + tar -cvf linux-x64_selfcontained.tar ${{env.RELEASE_LOCATION}}linux-x64/publish + tar -cvf osx-x64_selfcontained.tar ${{env.RELEASE_LOCATION}}osx-x64/publish + tar -cvf win-x64_selfcontained.tar ${{env.RELEASE_LOCATION}}win-x64/publish - name: Pack working-directory: "${{env.CODE_LOCATION}}/TFWhatsUp.Console" run: dotnet pack -c Release --no-build --verbosity normal From 03909903303fdb4948c25c7f40eba8673752d2e2 Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Fri, 25 Nov 2022 10:58:01 -0500 Subject: [PATCH 4/5] list zip file contents --- .github/workflows/build-process.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-process.yml b/.github/workflows/build-process.yml index 08ebf0c..10f59e7 100644 --- a/.github/workflows/build-process.yml +++ b/.github/workflows/build-process.yml @@ -63,6 +63,7 @@ jobs: tar -cvf linux-x64.tar ${{env.RELEASE_LOCATION}}linux-x64/publish tar -cvf osx-x64.tar ${{env.RELEASE_LOCATION}}osx-x64/publish tar -cvf win-x64.tar ${{env.RELEASE_LOCATION}}win-x64/publish + ls ./*.* - name: Clear the publish directories run: | rm -rf ${{env.RELEASE_LOCATION}}linux-x64/publish @@ -80,6 +81,7 @@ jobs: tar -cvf linux-x64_selfcontained.tar ${{env.RELEASE_LOCATION}}linux-x64/publish tar -cvf osx-x64_selfcontained.tar ${{env.RELEASE_LOCATION}}osx-x64/publish tar -cvf win-x64_selfcontained.tar ${{env.RELEASE_LOCATION}}win-x64/publish + ls ./*.* - name: Pack working-directory: "${{env.CODE_LOCATION}}/TFWhatsUp.Console" run: dotnet pack -c Release --no-build --verbosity normal From 9da1d54b7c41899f954e032b799551e7d7ec23d7 Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Fri, 25 Nov 2022 11:02:30 -0500 Subject: [PATCH 5/5] see if the full path does it --- .github/workflows/build-process.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-process.yml b/.github/workflows/build-process.yml index 10f59e7..422bca6 100644 --- a/.github/workflows/build-process.yml +++ b/.github/workflows/build-process.yml @@ -11,9 +11,9 @@ on: workflow_dispatch: env: - CODE_LOCATION: src/ - CONSOLE_PROJECT_LOCATION: src/TFWhatsUp.Console/ - RELEASE_LOCATION: src/TFWhatsUp.Console/bin/Release/net7.0/ + CODE_LOCATION: /home/runner/work/tf-whatsup/tf-whatsup/src/ + CONSOLE_PROJECT_LOCATION: /home/runner/work/tf-whatsup/tf-whatsup/src/TFWhatsUp.Console/ + RELEASE_LOCATION: /home/runner/work/tf-whatsup/tf-whatsup/src/TFWhatsUp.Console/bin/Release/net7.0/ PUBLISH_COMMAND_FLAGS: "-c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc false" PUBLISH_COMMAND_FLAGS_SC: "-c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --sc true" jobs: