Skip to content

Add check for normal CI runs along with automatic release notes #27

Add check for normal CI runs along with automatic release notes

Add check for normal CI runs along with automatic release notes #27

Workflow file for this run

name: CI
on:
push:
pull_request:
defaults:
run:
shell: pwsh
env:
DOTNET_TELEMETRY_OPTOUT: ttrue
DOTNET_NOLOGO: true
NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
skipped_by: ${{ steps.skip_check.outputs.skipped_by }}
ver: ${{ steps.computever.outputs.ver }}
steps:
- name: Check if this run should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: true
concurrent_skipping: same_content_newer
- name: Compute Version
id: computever
run: echo "ver=$(Get-Date -Format y.M.d).${{ github.run_number }}.${{ github.run_attempt }}" >> $env:GITHUB_OUTPUT
build:
needs: [setup]
if: needs.setup.outputs.should_skip != 'true'
name: 'Build #${{ needs.setup.outputs.ver }}'
uses: ./.github/workflows/build.yml
with:
version: daily.${{ needs.setup.outputs.ver }}
upload:
needs: [setup, build]
if: github.ref_name == 'master'
name: Upload Packages
uses: ./.github/workflows/upload-packages.yml
with:
workflow-id: ${{ needs.setup.outputs.should_skip == 'true' && fromJSON(needs.setup.outputs.skipped_by).workflowId || github.run_id }}
report_check:
needs: [build]
if: always() && github.event_name != 'pull_request'
name: Report GitHub check
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: LouisBrunner/[email protected]
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Build status
conclusion: ${{ needs.build.result }}