-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 865 Bytes
/
create-release.yml
File metadata and controls
30 lines (30 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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