-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.14 KB
/
pack.yaml
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
name: Build and Publish NuGet Package
on:
push:
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Go To Right Folder
run: ls -la && cd Source/Furesoft.PrattParser
- name: Install dependencies
run: dotnet restore
- name: Build and package
run: |
dotnet build -c Release
dotnet pack -c Release -o ./nuget
- name: Publish to NuGet
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: ./nuget/*.nupkg
- name: Publish to GitHub Packages
uses: docker/login-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package
run: |
dotnet nuget push ./nuget/*.nupkg -s https://nuget.pkg.github.com/${GITHUB_OWNER}/index.json -k ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_OWNER: ${{ github.repository_owner }}