From c47323a074784db590d25b6ec2c75fdb5fecfdad Mon Sep 17 00:00:00 2001 From: HavenDV Date: Mon, 19 Aug 2024 18:09:59 +0400 Subject: [PATCH] ci: Added releases. --- .github/workflows/dotnet.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 37dcfdb..22dc061 100755 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -6,6 +6,9 @@ on: tags: - v** +permissions: + contents: write + jobs: publish: name: Publish @@ -16,4 +19,20 @@ jobs: enable-caching: false additional-test-arguments: '--logger GitHubActions' secrets: - nuget-key: ${{ secrets.NUGET_KEY }} \ No newline at end of file + nuget-key: ${{ secrets.NUGET_KEY }} + + release: + name: Release + runs-on: ubuntu-latest + needs: [publish] + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create release + run: gh release create ${{ github.ref_name }} + --title "${{ github.ref_name }}" + --generate-notes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file