diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..7850c0d --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,30 @@ +name: Create Release on Tag Push +env: + PUBLISH_PATH: "./publish" + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} +on: + push: + tags: + - '*' # On tag push +permissions: + contents: write +jobs: + create_release: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Publish + run: dotnet publish --output '${{ env.PUBLISH_PATH }}' + - name: Compress release artifact + run: 7z a AI.NET.zip ${{ env.PUBLISH_PATH }} + - name: Create Release using gh CLI + run: | + gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --generate-notes + gh release upload ${{ github.ref_name }} AI.NET.zip