Skip to content

Merge pull request #295 from fsprojects/repo-assist/modernize-ref-to-… #172

Merge pull request #295 from fsprojects/repo-assist/modernize-ref-to-…

Merge pull request #295 from fsprojects/repo-assist/modernize-ref-to-… #172

Workflow file for this run

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