Skip to content

Merge pull request #390 from datalust/ci/gh-actions #21

Merge pull request #390 from datalust/ci/gh-actions

Merge pull request #390 from datalust/ci/gh-actions #21

Workflow file for this run

# If this file is renamed, the incrementing run attempt number will be reset.
name: CI
on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]
env:
CI_BUILD_NUMBER_BASE: ${{ github.run_number }}
CI_TARGET_BRANCH: ${{ github.head_ref || github.ref_name }}
CI_PUBLISH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
jobs:
build-windows:
name: Build (Windows)
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build and Publish
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
./build/Build.Windows.ps1
build-linux:
name: Build (Linux)
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Configure Docker
run: |
docker run --privileged --rm linuxkit/binfmt:bebbae0c1100ebf7bf2ad4dfb9dfd719cf0ef132
sudo service docker restart
- name: Build and Publish
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
shell: pwsh
run: |
./build/Build.Linux.ps1