-
Notifications
You must be signed in to change notification settings - Fork 49
66 lines (54 loc) · 1.78 KB
/
build-publish.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
is-tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
client: ['FiveM']
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup - GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
preferLatestVersion: true
- name: Setup - dotnet framework 4.8
run: |
choco install netfx-4.8-devpack -y
dotnet --version # Verify installation
- name: Setup - dotnet 8
uses: actions/setup-dotnet@v4
with:
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
env:
NUGET_AUTH_TOKEN: ${{ github.token }}
- name: GitVersion
id: git-version
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
- name: Dotnet - Restore
run: dotnet restore
- name: Dotnet - Build
run: dotnet build ScaleformUI_CSharp -c "Release" --no-restore
- name: Dotnet - Test
run: dotnet test ScaleformUI_CSharp -c "Release" --no-restore
- name: Dotnet - Pack
run: dotnet pack ScaleformUI_CSharp -c "Release" --no-restore
- name: Publish - NuGet
if: ${{ env.is-tag == 'true' }}
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
working-directory: ScaleformUI\CompiledLibs\
- name: Publish - GitHub
if: ${{ env.is-tag == 'true' }}
run: dotnet nuget push **/*.nupkg --skip-duplicate
working-directory: ScaleformUI\CompiledLibs\