diff --git a/.github/workflows/build-gate.yml b/.github/workflows/build-gate.yml index fd7a653..3223450 100644 --- a/.github/workflows/build-gate.yml +++ b/.github/workflows/build-gate.yml @@ -7,7 +7,10 @@ on: env: BUILD_VERSION: 0.1.${{github.run_number}} SLN_PATH: src/ShellRunner.sln - TEST_PATH: src/TestApp/bin/Release/net6.0/TestApp.dll + PROJECT_PATH: src/ShellRunner/ShellRunner.csproj + PRE_RELEASE_ARTIFACTS: src/ShellRunner/bin/Release/ShellRunner.${{ env.BUILD_VERSION }}-alpha.nupkg + TEST_ARTIFACTS: src/**/bin/**/* + TEST_PATH: TestApp/bin/Release/net6.0/TestApp.dll jobs: build: @@ -29,23 +32,44 @@ jobs: --no-restore -p:Version=$BUILD_VERSION - - name: Upload ShellRunner Build Artifacts + - name: Test-Pack + run: dotnet pack $PROJECT_PATH + -c Release + --no-restore + --no-build + -p:PackageVersion=$BUILD_VERSION-alpha + + - name: Print Files + run: ls -R + + #- name: Test Echo + # run: echo ./src/ShellRunner/bin/Release/ShellRunner.$BUILD_VERSION-alpha.nupkg + - name: Test Echo + run: echo ${{env.PRE_RELEASE_ARTIFACTS}} + + - name: Upload Test Nuget Artifacts uses: actions/upload-artifact@v2 with: name: BuildArtifacts - path: ./**/bin/Release/**/* + path: ${{env.PRE_RELEASE_ARTIFACTS}} + if-no-files-found: error + + - name: Upload Test Artifacts + uses: actions/upload-artifact@v2 + with: + name: TestArtifacts + path: ${{env.TEST_ARTIFACTS}} build-test: needs: build runs-on: ubuntu-latest - steps: - + steps: - name: Download artifacts uses: actions/download-artifact@v2 with: - name: BuildArtifacts + name: TestArtifacts - name: Test - run: dotnet $TEST_PATH + run: dotnet ${{env.TEST_PATH}} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 474fefc..428fa89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,10 @@ env: SLN_PATH: src/ShellRunner.sln TEST_PATH: src/TestApp/bin/Release/net6.0/TestApp.dll PROJECT_PATH: src/ShellRunner/ShellRunner.csproj - PRE_RELEASE_ARTIFACTS: ./**/ShellRunner.$BUILD_VERSION-alpha.nupkg - RELEASE_ARTIFACTS: ./**/ShellRunner.$BUILD_VERSION.nupkg + PRE_RELEASE_ARTIFACTS: src/ShellRunner/bin/Release/netstandard2.0/ShellRunner.$BUILD_VERSION-alpha.nupkg + PRE_RELEASE_PATH: ShellRunner/bin/Release/netstandard2.0/ShellRunner.$BUILD_VERSION-alpha.nupkg + RELEASE_ARTIFACTS: src/ShellRunner/bin/Release/netstandard2.0/ShellRunner.$BUILD_VERSION.nupkg + RELEASE_PATH: ShellRunner/bin/Release/netstandard2.0/ShellRunner.$BUILD_VERSION.nupkg jobs: build: @@ -72,10 +74,10 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v2 with: - name: PreReleaseArtifacts + name: PreReleaseArtifacts - name: Push ShellRunner Pre-Release Nuget - run: dotnet nuget push ./**/*-alpha.nupkg + run: dotnet nuget push $PRE_RELEASE_PATH --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json release: @@ -91,6 +93,6 @@ jobs: with: name: ReleaseArtifacts - - name: Push ShellRunner Pre-Release Nuget - run: dotnet nuget push ./**/*.nupkg + - name: Push ShellRunner Release Nuget + run: dotnet nuget push $RELEASE_PATH --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json