ahah #9
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: Release | |
on: | |
push: | |
branches: | |
- 'release/**' | |
- 'preview/**' | |
# paths: | |
# - 'src/**' | |
workflow_call: | |
permissions: | |
actions: read | |
env: | |
dotnet-sdk-version: '9.x' | |
jobs: | |
global-variables: | |
name: 'Global variables' | |
runs-on: ubuntu-latest | |
outputs: | |
github-run-id: ${{ github.run_id }} | |
github-run-number: ${{ github.run_number }} | |
steps: | |
- name: 'Global variables' | |
id: github | |
run: | | |
echo "github-run-id:${{ github.run_id }}" | |
echo "github-run-number:${{ github.run_number }}" | |
build: | |
name: Build | |
needs: [global-variables] | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
with: | |
run-id: ${{ needs.global-variables.outputs.github-run-id }} | |
run-number: ${{ needs.global-variables.outputs.github-run-number }} | |
validate: | |
name: 'Validate' | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout ${{ github.head_ref || github.ref }}' | |
uses: actions/checkout@v4 | |
- name: 'Setup .NET' | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.dotnet-sdk-version }} | |
- name: 'Validate warnings with .NET CLI' | |
shell: bash | |
run: | | |
dotnet format analyzers --severity warn --verify-no-changes | |
tee analyzers.txt | |
car analyzers.txt >> $GITHUB_STEP_SUMMARY | |
publish-package: | |
name: 'Publish' | |
uses: ./.github/workflows/publish-nuget-package.yml | |
needs: [global-variables, validate, build] | |
secrets: inherit | |
with: | |
artifact-run-id: ${{ needs.global-variables.outputs.github-run-id }} | |
artifact-name: ${{ needs.build.outputs.package-artifact-name }} | |
nuget-feed-server: 'NuGet' | |
environment: 'NuGet' |