Skip to content

Merge pull request #87 from Sebbs128/readystate-serialize #14

Merge pull request #87 from Sebbs128/readystate-serialize

Merge pull request #87 from Sebbs128/readystate-serialize #14

Workflow file for this run

name: CI
on: [push, pull_request]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
DOCS_PATH: ${{ secrets.DOCS_PATH }}
DOCS_BRANCH: ${{ secrets.DOCS_BRANCH }}
jobs:
can_document:
runs-on: ubuntu-latest
outputs:
value: ${{ steps.check_job.outputs.value }}
steps:
- name: Checks whether documentation can be built
id: check_job
run: |
echo "value: ${{ env.DOCS_PATH != null && github.ref == env.DOCS_BRANCH }}"
echo "::set-output name=value::${{ env.DOCS_PATH != null && github.ref == env.DOCS_BRANCH }}"
documentation:
needs: [can_document]
runs-on: ubuntu-latest
if: needs.can_document.outputs.value == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: |
cd $DOCS_PATH
npm install
- name: Deploy Doclet
run: |
cd $DOCS_PATH
npx pilet publish --fresh --url https://feed.piral.cloud/api/v1/pilet/anglesharp --api-key ${{ secrets.PIRAL_FEED_KEY }}
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Build
run: ./build.sh
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Build
run: |
if ($env:GITHUB_REF -eq "refs/heads/main") {
.\build.ps1 -Target Publish
} elseif ($env:GITHUB_REF -eq "refs/heads/devel") {
.\build.ps1 -Target PrePublish
} else {
.\build.ps1
}