diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index be467e5f..54cc40c4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -54,7 +54,7 @@ jobs: - name: 🧰 Setup .NET uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 with: - dotnet-version: 8.0.x + global-json-file: global.json if: matrix.language == 'csharp' - name: 🗃️ Setup NuGet cache diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml new file mode 100644 index 00000000..87afe636 --- /dev/null +++ b/.github/workflows/create-tag.yml @@ -0,0 +1,44 @@ +name: Create tag + +on: + workflow_dispatch: + +env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: false + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + +permissions: + contents: read + +jobs: + create-tag: + if: github.actor == 'skarllot' + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: 🛡️ Harden Runner + uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + with: + egress-policy: audit + + - name: 🛒 Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + + - name: 🧰 Setup .NET + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 + with: + global-json-file: global.json + + - name: 🛠️ Setup Nerdbank.GitVersioning + run: dotnet tool install --tool-path . nbgv + + - name: 🏷️ Tag release + run: ./nbgv tag + + - name: 🚀 Push Git tags + run: git push --tags \ No newline at end of file diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 91f14d96..74570863 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -36,7 +36,7 @@ jobs: - name: 🧰 Setup .NET uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 with: - dotnet-version: 8.0.x + global-json-file: global.json - name: 🗃️ Setup NuGet cache uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 979a7158..3347568a 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,9 +1,8 @@ name: Package on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + release: + types: [published] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: false @@ -32,7 +31,7 @@ jobs: - name: 🧰 Setup .NET uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 with: - dotnet-version: 8.0.x + global-json-file: global.json - name: 🗃️ Setup NuGet cache uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2