-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.25 KB
/
release.yaml
File metadata and controls
52 lines (40 loc) · 1.25 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build Server
run: dotnet publish Octans.Server/Octans.Server.csproj -c Release -o publish/server
- name: Build Client
run: dotnet publish Octans.Client/Octans.Client.csproj -c Release -o publish/client
- name: Zip Server
run: cd publish/server && zip -r ../../octans-server.zip .
- name: Zip Client
run: cd publish/client && zip -r ../../octans-client.zip .
- name: Extract version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
files: |
octans-server.zip
octans-client.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}