-
Notifications
You must be signed in to change notification settings - Fork 56
42 lines (41 loc) · 1.35 KB
/
publish.yml
File metadata and controls
42 lines (41 loc) · 1.35 KB
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
name: Build and Publish
on:
push:
branches: [ main ]
permissions:
id-token: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Install tools
run: dotnet tool restore
- name: Build and Test
run: dotnet test -c Release
- name: Pack
run: dotnet pack -c Release
- name: Build docs
run: dotnet fsdocs build --properties Configuration=Release
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
publish_branch: gh-pages
force_orphan: true
- name: Obtain NuGet key
# this hash is v1.1.0
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544
id: login
with:
user: dsyme
- name: Publish NuGets (if this version not published before)
run: dotnet nuget push src/FSharp.Control.AsyncSeq/bin/Release/*.nupkg -s https://www.nuget.org/api/v2/package -k ${{ steps.login.outputs.NUGET_API_KEY }} --skip-duplicate
# NUGET_ORG_TOKEN_2021 is listed in "Repository secrets" in https://github.com/fsprojects/FSharp.Control.AsyncSeq/settings/secrets/actions
# note, the nuget org token expires around 24 July 2022