Repository navigation
test: assertions that unwrap options, value options and results (#44) #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to GitHub | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| CONFIGURATION: Release | |
| jobs: | |
| build: | |
| # Sets permissions of the GITHUB_TOKEN to allow release creating | |
| permissions: | |
| packages: write | |
| environment: | |
| name: nuget | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup necessary dotnet SDKs | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| dotnet-version: | | |
| 10.x | |
| 8.x | |
| - name: Add the GitHub source | |
| run: dotnet nuget add source --name "github.com" "https://nuget.pkg.github.com/fsprojects/index.json" | |
| - name: Ensure NuGet package source mapping | |
| shell: pwsh | |
| run: | | |
| $nugetConfigPath = "$HOME/.nuget/NuGet/NuGet.Config" | |
| [xml]$nugetConfig = Get-Content $nugetConfigPath | |
| $packageSourceMapping = $nugetConfig.configuration.packageSourceMapping | |
| if ($packageSourceMapping -ne $null) { | |
| $packageSourceMapping.RemoveAll() | |
| } else { | |
| $packageSourceMapping = $nugetConfig.CreateElement("packageSourceMapping") | |
| $nugetConfig.configuration.AppendChild($packageSourceMapping) | |
| } | |
| $nugetSource = $nugetConfig.CreateElement("packageSource") | |
| $nugetSource.SetAttribute("key", "nuget.org") | |
| $nugetPattern = $nugetConfig.CreateElement("package") | |
| $nugetPattern.SetAttribute("pattern", "*") | |
| $nugetSource.AppendChild($nugetPattern) | |
| $packageSourceMapping.AppendChild($nugetSource) | |
| $nugetConfig.Save($nugetConfigPath) | |
| - name: Publish to GitHub | |
| env: | |
| NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FAKE_DETAILED_ERRORS: true | |
| ENABLE_COVERAGE: false | |
| run: | | |
| chmod +x ./build.sh | |
| ./build.sh "PublishToGitHub" |