-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 1.21 KB
/
merge.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
name: Merge Workflow
on:
push:
branches: [main]
workflow_dispatch:
jobs:
merge_job:
name: Merge Job (Windows)
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get latest release
id: get_release
uses: frankhaugen/Workflows/.github/actions/github-latest-release@main
with:
token: ${{ github.token }}
- name: Restore NuGet Packages
run: dotnet restore
- name: Build Solution
run: dotnet build --configuration Release --no-restore /p:Version=${{ steps.get_release.outputs.tag }}.${{ github.run_number }}
# - name: Run Tests
# run: dotnet test --no-build --configuration Release --logger trx --results-directory TestResults
- name: Pack NuGet Packages
run: dotnet pack --no-build --configuration Release --output nupkgs /p:Version=${{ steps.get_release.outputs.tag }}-preview
- name: Push NuGet Packages
run: dotnet nuget push **/*.nupkg -k ${{ secrets.nugetkey }} -s https://api.nuget.org/v3/index.json --skip-duplicate