diff --git a/.github/continuous-delivery.yml b/.github/continuous-delivery.yml index 71dc59b..0a27000 100644 --- a/.github/continuous-delivery.yml +++ b/.github/continuous-delivery.yml @@ -39,7 +39,7 @@ jobs: - *setup-dotnet - *mutation-test - *mutation-test-archive - - *upload-artifacts + - *mutation-test-upload-artifacts integration-tests: name: 'Integration Tests' needs: build diff --git a/.github/continuous-integration.yml b/.github/continuous-integration.yml index f85f292..dbc5d55 100644 --- a/.github/continuous-integration.yml +++ b/.github/continuous-integration.yml @@ -39,7 +39,7 @@ jobs: - *setup-dotnet - *mutation-test - *mutation-test-archive - - *upload-artifacts + - *mutation-test-upload-artifacts integration-tests: name: 'Integration Tests' needs: build diff --git a/.github/deploy-release.yml b/.github/deploy-release.yml index 2dfe758..7654fc3 100644 --- a/.github/deploy-release.yml +++ b/.github/deploy-release.yml @@ -42,20 +42,19 @@ jobs: run: | set -x tag="${GITHUB_REF#refs/*/}" - options=() - - options+=("-m" "") # leave the title and body unchanged + files=() IFS=$'\n'; for asset in $(find ./artifacts -name "verlite-*.tar.gz"); do - options+=("-a" "$asset") + files+=("$asset") done + IFS=$'\n'; for asset in $(find ./artifacts -name "*.nupkg"); do - options+=("-a" "$asset") + files+=("$asset") done - hub release edit "${options[@]}" "$tag" + gh release upload "$tag" "${files[@]}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/shared.yml b/.github/shared.yml index 9fa81f2..f82422a 100644 --- a/.github/shared.yml +++ b/.github/shared.yml @@ -70,6 +70,16 @@ definitions: mv StrykerOutput ../../artifacts/StrykerOutput fi + mutation-test-upload-artifacts: &mutation-test-upload-artifacts + name: Upload Artifacts + uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: artifacts-mutation-test + if-no-files-found: error + path: | + artifacts/* + publish-codecov: &publish-codecov name: Publish Codecov uses: codecov/codecov-action@v2 @@ -87,12 +97,17 @@ definitions: if: success() || failure() with: name: artifacts + if-no-files-found: error path: | artifacts/* download-artifacts: &download-artifacts name: Download Artifacts uses: actions/download-artifact@v4 + with: + path: artifacts + pattern: '*' + merge-multiple: true publish-github: &publish-github name: Publish Nuget GitHub @@ -138,7 +153,14 @@ definitions: env: rid: ${{ matrix.rid }} exe: ${{ matrix.exe }} - - *upload-artifacts + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: artifacts-${{ matrix.rid }} + if-no-files-found: error + path: | + artifacts/* empty: "hi" # fixes the yml parser from messing the last value up diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 39d894c..5febf10 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -65,6 +65,7 @@ jobs: if: success() || failure() with: name: artifacts + if-no-files-found: error path: | artifacts/* @@ -116,11 +117,11 @@ jobs: uses: actions/upload-artifact@v4 if: success() || failure() with: - name: artifacts + name: artifacts-${{ matrix.rid }} + if-no-files-found: error path: | artifacts/* - mutation-tests: name: Mutation Test needs: build @@ -166,7 +167,8 @@ jobs: uses: actions/upload-artifact@v4 if: success() || failure() with: - name: artifacts + name: artifacts-mutation-test + if-no-files-found: error path: | artifacts/* @@ -227,6 +229,10 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 + with: + path: artifacts + pattern: '*' + merge-multiple: true - name: Publish Nuget GitHub run: dotnet nuget push 'artifacts/*.nupkg' -k ${GITHUB_TOKEN} -s github --skip-duplicate diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9a0e2ca..5647619 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -65,6 +65,7 @@ jobs: if: success() || failure() with: name: artifacts + if-no-files-found: error path: | artifacts/* @@ -116,11 +117,11 @@ jobs: uses: actions/upload-artifact@v4 if: success() || failure() with: - name: artifacts + name: artifacts-${{ matrix.rid }} + if-no-files-found: error path: | artifacts/* - mutation-tests: name: Mutation Test needs: build @@ -166,7 +167,8 @@ jobs: uses: actions/upload-artifact@v4 if: success() || failure() with: - name: artifacts + name: artifacts-mutation-test + if-no-files-found: error path: | artifacts/* diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index f113517..215982d 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -66,6 +66,7 @@ jobs: if: success() || failure() with: name: artifacts + if-no-files-found: error path: | artifacts/* @@ -117,11 +118,11 @@ jobs: uses: actions/upload-artifact@v4 if: success() || failure() with: - name: artifacts + name: artifacts-${{ matrix.rid }} + if-no-files-found: error path: | artifacts/* - release: name: Release runs-on: ubuntu-latest @@ -150,25 +151,28 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 + with: + path: artifacts + pattern: '*' + merge-multiple: true - name: Create Release run: | set -x tag="${GITHUB_REF#refs/*/}" - options=() - - options+=("-m" "") # leave the title and body unchanged + files=() IFS=$'\n'; for asset in $(find ./artifacts -name "verlite-*.tar.gz"); do - options+=("-a" "$asset") + files+=("$asset") done + IFS=$'\n'; for asset in $(find ./artifacts -name "*.nupkg"); do - options+=("-a" "$asset") + files+=("$asset") done - hub release edit "${options[@]}" "$tag" + gh release upload "$tag" "${files[@]}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}