diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml index a9ee5dc..c0cf752 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/build-debug.yml @@ -13,17 +13,14 @@ on: jobs: build-dotnet: runs-on: ubuntu-latest - env: - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - NUGET_XMLDOC_MODE: skip + timeout-minutes: 10 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v1.9.0 + - uses: actions/checkout@v3 + - uses: Cysharp/Actions/.github/actions/setup-dotnet@main with: dotnet-version: | 3.1.x 5.0.x 6.0.x - - run: dotnet build src/WebSerializer -c Debug - - run: dotnet test tests/WebSerializer.Tests -c Debug < /dev/null \ No newline at end of file + - run: dotnet build -c Debug + - run: dotnet test -c Debug diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 62596f9..4be28da 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -6,52 +6,45 @@ on: tag: description: "tag: git tag you want create. (sample 1.0.0)" required: true - dry_run: - description: "dry_run: true will never create relase/nuget." + dry-run: + description: "dry-run: true will never create relase/nuget." required: true - default: "false" + default: false + type: boolean env: GIT_TAG: ${{ github.event.inputs.tag }} - DRY_RUN: ${{ github.event.inputs.dry_run }} - DRY_RUN_BRANCH_PREFIX: "test_release" + DRY_RUN: ${{ github.event.inputs.dry-run }} jobs: build-dotnet: runs-on: ubuntu-latest timeout-minutes: 10 - env: - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - NUGET_XMLDOC_MODE: skip steps: - run: echo ${{ needs.update-packagejson.outputs.sha }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ needs.update-packagejson.outputs.sha }} - - uses: actions/setup-dotnet@v1.9.0 + - uses: Cysharp/Actions/.github/actions/setup-dotnet@main with: dotnet-version: | 3.1.x 5.0.x 6.0.x - - run: dotnet build src/WebSerializer -c Release -p:Version=${{ env.GIT_TAG }} - - run: dotnet test tests/WebSerializer.Tests -c Release --no-build - - run: dotnet pack ./src/WebSerializer/WebSerializer.csproj -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish + - run: dotnet build -c Release -p:Version=${{ env.GIT_TAG }} + - run: dotnet test -c Release --no-build + - run: dotnet pack -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish # Store artifacts. - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v2 with: name: nuget path: ./publish/ create-release: - if: github.event.inputs.dry_run == 'false' + if: github.event.inputs.dry-run == 'false' needs: [build-dotnet] runs-on: ubuntu-latest - env: - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - NUGET_XMLDOC_MODE: skip + timeout-minutes: 10 steps: # Create Release - uses: actions/create-release@v1 @@ -65,17 +58,6 @@ jobs: draft: true prerelease: false # Download (All) Artifacts to current directory - - uses: actions/download-artifact@v2-preview + - uses: actions/download-artifact@v2 # Upload to NuGet - run: dotnet nuget push "./nuget/*.nupkg" --skip-duplicate -s https://www.nuget.org/api/v2/package -k ${{ secrets.NUGET_KEY }} - - cleanup: - if: github.event.inputs.dry_run == 'true' - needs: [build-dotnet] - runs-on: ubuntu-latest - steps: - - name: Delete branch - uses: dawidd6/action-delete-branch@v3 - with: - github_token: ${{ github.token }} - branches: ${{ env.DRY_RUN_BRANCH_PREFIX }}-${{ env.GIT_TAG }} \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 70c3a28..b480c3e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,24 +1,10 @@ name: "Close stale issues" on: + workflow_dispatch: schedule: - cron: "0 0 * * *" jobs: stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - # enable issue - stale-issue-message: "This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days." - stale-issue-label: "stale" - # enable pr - stale-pr-message: "This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days." - stale-pr-label: "stale" - days-before-stale: 90 - days-before-close: 7 - exempt-issue-labels: "wip" - exempt-pr-labels: "wip" - remove-stale-when-updated: true + uses: Cysharp/Actions/.github/workflows/stale-issue.yaml@main diff --git a/sandbox/Benchmark/Benchmark.csproj b/sandbox/Benchmark/Benchmark.csproj index caa367d..5370ca9 100644 --- a/sandbox/Benchmark/Benchmark.csproj +++ b/sandbox/Benchmark/Benchmark.csproj @@ -5,6 +5,7 @@ net6.0 enable enable + false diff --git a/sandbox/ConsoleApp/ConsoleApp.csproj b/sandbox/ConsoleApp/ConsoleApp.csproj index da1459b..002ac94 100644 --- a/sandbox/ConsoleApp/ConsoleApp.csproj +++ b/sandbox/ConsoleApp/ConsoleApp.csproj @@ -6,6 +6,7 @@ enable enable latest + false diff --git a/sandbox/WebApp/WebApp.csproj b/sandbox/WebApp/WebApp.csproj index c72a32c..a73f654 100644 --- a/sandbox/WebApp/WebApp.csproj +++ b/sandbox/WebApp/WebApp.csproj @@ -5,6 +5,7 @@ net6.0 enable enable + false