feat(github-actions): Add GitHub Actions support #12
Workflow file for this run
This file contains 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 Build | |
# Trigger build for pushes to the main branch and all release branches | |
# As well as all Pull Requests targeting these branches | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- main | |
- master | |
- release/* | |
# Adding the "workflow_dispatch" trigger allows the workflow to be started manually from the GitHub Web UI | |
workflow_dispatch: | |
permissions: | |
# Write permissions to issues and PRs is required for automatically setting the PR milestone | |
issues: write | |
pull-requests: write | |
# Read access to the repo is required for generating the change log | |
contents: read | |
env: | |
BUILD_CONFIGURATION: Release | |
# Disable telemetry and "Welcome" message of dotnet CLI | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_NOLOGO: true | |
# Expose the Pull Request number as environment variable (there is no predefined variable for this unfortunately) | |
PR_NUMBER: ${{ github.event.number }} | |
GITHUB_ACCESSTOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Disable shallow clones (Nerdbank.GitVersioning requires the full history to calculate the version) | |
submodules: recursive | |
- name: Run Cake Build | |
run: |- | |
./build.sh --target CI --configuration $BUILD_CONFIGURATION |