-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (42 loc) · 1.17 KB
/
dotnet.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
name: .NET
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
# - name: Restore dependencies
# run: dotnet restore
# - name: Build
# run: dotnet build --no-restore
# - name: Test
# run: dotnet test --no-build --verbosity normal
- name: Push package
run: |
# versioning
commithash=$(git rev-parse --short HEAD)
currtime=$(date +%s)
echo "commit hash is $commithash"
echo "time is $currtime"
# ML
cd ModuleLauncher.NET
dotnet restore
dotnet build
dotnet publish -p:PublishRelease=false
cd bin/Debug
# Getting file extension name is .nupkg
file=""
cdir=`ls ./*.nupkg`
for eachfile in $cdir
do
file=$eachfile
done
dotnet nuget push $file --api-key ${{ secrets.NUGET_KEY }} --source "nuget" --skip-duplicate