From 8a28dfe44dcce2b757959617ad4a43052d6c3ca1 Mon Sep 17 00:00:00 2001
From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com>
Date: Tue, 26 Jul 2022 14:20:50 +0900
Subject: [PATCH 1/4] chore: IsPackable marking
---
sandbox/Benchmark/Benchmark.csproj | 1 +
sandbox/ConsoleApp/ConsoleApp.csproj | 1 +
sandbox/WebApp/WebApp.csproj | 1 +
3 files changed, 3 insertions(+)
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
From 0c73aa03908166168c15a53f6c162e588315eef3 Mon Sep 17 00:00:00 2001
From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com>
Date: Tue, 26 Jul 2022 14:21:00 +0900
Subject: [PATCH 2/4] chore: use Cysharp/Actions reusable workflow stale
---
.github/workflows/stale.yml | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
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
From e98d2bf2d6f88ebf9991322283f80d7d64389214 Mon Sep 17 00:00:00 2001
From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com>
Date: Tue, 26 Jul 2022 14:22:06 +0900
Subject: [PATCH 3/4] feat: use Cysharp/Actions for release
---
.github/workflows/build-debug.yml | 13 ++++-----
.github/workflows/build-release.yml | 43 ++++++++---------------------
2 files changed, 17 insertions(+), 39 deletions(-)
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..fc93aaa 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -6,52 +6,44 @@ 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"
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 +57,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
From 61cdfbd02040160bfc14853a0912a8fdd2009ca8 Mon Sep 17 00:00:00 2001
From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com>
Date: Tue, 26 Jul 2022 14:22:58 +0900
Subject: [PATCH 4/4] chore: type boolean
---
.github/workflows/build-release.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index fc93aaa..4be28da 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -9,7 +9,8 @@ on:
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 }}