-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (49 loc) · 1.54 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
name: Release
on:
push:
branches: [ main ]
permissions:
contents: write
pages: write
id-token: write
jobs:
nuget-pack:
runs-on: ubuntu-latest
if: ${{ !github.event.repository.fork && github.ref == 'refs/heads/main' }}
environment: release
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Build
run: dotnet fsi build.fsx
- name: Pack
run: dotnet pack src/FSharp.Analyzers/FSharp.Analyzers.fsproj --configuration Release --output artifacts
- name: Upload NuGet artifact
uses: actions/upload-artifact@v3
with:
name: nuget-package
path: artifacts/G-Research.FSharp.Analyzers.*.nupkg
- name: Upload documentation
uses: actions/upload-pages-artifact@v2
with:
path: ./output
nuget-publish:
runs-on: ubuntu-latest
if: ${{ !github.event.repository.fork && github.ref == 'refs/heads/main' }}
needs: [ nuget-pack ]
environment: release
steps:
- name: Download NuGet artifact
uses: actions/download-artifact@v3
with:
name: nuget-package
- name: Publish to NuGet
run: dotnet nuget push "G-Research.FSharp.Analyzers.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
deploy:
runs-on: ubuntu-latest
needs: [ nuget-pack ]
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2