refactor(docs): use variable for the common string constants in `apir… #1039
Workflow file for this run
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: CI | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| # to execute once a day (more info see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule ) | |
| schedule: | |
| - cron: '0 0 * * *' | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - '**' | |
| env: | |
| DOTNET_VERSION: 9.0.201 | |
| jobs: | |
| buildAndTest: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macOS-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet fsi build.fsx -t Build | |
| - name: Run tests | |
| run: dotnet fsi build.fsx -t Test | |
| - name: Run FSharpLint on itself | |
| run: dotnet fsi build.fsx -t SelfCheck | |
| deployReleaseBinaries: | |
| needs: buildAndTest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Build | |
| run: dotnet fsi build.fsx | |
| - name: Pack | |
| run: dotnet fsi build.fsx -t Pack | |
| - name: Get Changelog Entry | |
| id: changelog_reader | |
| uses: mindsers/changelog-reader-action@v1 | |
| with: | |
| version: ${{ github.ref }} | |
| path: ./CHANGELOG.md | |
| - name: Upload binaries to nuget (if nugetKey present) | |
| env: | |
| nuget-key: ${{ secrets.NUGET_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: dotnet fsi build.fsx -t Push | |
| - name: Create Release (if tag) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: create_release | |
| uses: actions/create-release@latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: ${{ github.ref }} | |
| body: ${{ steps.changelog_reader.outputs.log_entry }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload binaries to release (if tag) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: out/*.nupkg | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true | |
| deployReleaseDocs: | |
| needs: deployReleaseBinaries | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Run Fornax | |
| run: dotnet fsi build.fsx -t Docs | |
| - name: Deploy (if tag) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| personal_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs/_public | |
| publish_branch: gh-pages | |
| force_orphan: true |