-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (55 loc) · 2.35 KB
/
release.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
67
68
69
70
71
72
73
74
75
76
# This is a basic workflow to help you get started with Actions
name: Release version to MyGet
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: nuget/[email protected]
with:
nuget-api-key: ${{ secrets.MYGETAPI }}
nuget-version: 'latest'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1
env:
working-directory: MetaMomentum/
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# - name: Nuget Add Umbraco Prerelease Source
# run: dotnet nuget add source https://www.myget.org/F/umbracoprereleases/api/v3/index.json --name "Umbraco Prereleases"
- name: Run Nuget restore
run: nuget restore metamomentum.sln
- name: Copy lucene analyser
run: |
$src = "C:\Users\runneradmin\.nuget\packages\lucene.net\4.8.0-beta00014\analyzers\dotnet\cs"
$dest = "C:\Users\runneradmin\.nuget\packages\lucene.net\3.0.3\analyzers\dotnet\cs"
if (!(Test-Path -Path $dest)) {
New-Item -ItemType directory -Path $dest
}
Copy-Item -Path $src\*.dll -Destination $dest
- name: build
run: msbuild
working-directory: MetaMomentum.Core/
- name: build
run: msbuild
working-directory: MetaMomentum/
#- name: Nuget Add Source
# run: nuget sources Add -Name "nuget" -Source https://api.nuget.org/v3/index.json
# - name: Nuget SetAPIKey
# run: nuget setapikey ${{ secrets.NUGETAPI }} #-Source "nuget"
- name: Publish MetaMomentum to MyGet
working-directory: MetaMomentum/
run: dotnet nuget push **\*.nupkg --api-key ${{ secrets.MYGETAPI }} --source https://www.myget.org/F/digital-momentum/api/v2/package
- name: Publish MetaMomentum.core to MyGet
working-directory: MetaMomentum.Core/
run: dotnet nuget push **\*.nupkg --api-key ${{ secrets.MYGETAPI }} --source https://www.myget.org/F/digital-momentum/api/v2/package