diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3ecd43..511528e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,8 +6,9 @@ env: DOTNET_VERSION: '10.x' on: - pull_request: - types: [ closed ] + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' branches: [ main ] workflow_dispatch: @@ -16,13 +17,11 @@ permissions: jobs: build: - if: github.event.pull_request.merged == true runs-on: ubuntu-latest - steps: - uses: actions/checkout@v6 - - name: Set up .NET Core + - name: Set up .NET uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.DOTNET_VERSION }} @@ -57,6 +56,18 @@ jobs: name: .net-app path: ${{env.DOTNET_ROOT}}/REG + github-release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + tag_name: ${{ github.ref_name }} + env: + GITHUB_TOKEN: ${{ env.RELEASE_TOKEN }} + deploy: permissions: contents: none