Skip to content

debug

debug #25

Workflow file for this run

name: release.yml
on:
push:
branches:
- main
- feature/changesets
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions: { }
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_VERSION: 8.0.x
NODE_VERSION: 20.x
SERILOG_EXPRESSIONS_FORMATTING_PACKAGE_JSON: ./src/Serilog.Expressions.Formatting/package.json
SERILOG_EXPRESSIONS_FORMATTING_CSPROJ: ./src/Serilog.Expressions.Formatting/Serilog.Expressions.Formatting.csproj
jobs:
release:
name: Release
runs-on: ubuntu-24.04
permissions:
pull-requests: write
contents: write
issues: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
disable-telemetry: true
- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: Setup dotnet 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Corepack
run: corepack enable
- name: Install Dependencies
run: yarn install --immutable
- name: Dotnet restore
run: dotnet restore --locked-mode
- name: Dotnet build
run: dotnet build --configuration Release --no-restore
- name: Test with dotnet
run: dotnet test --configuration Release --no-restore --logger trx --results-directory "TestResults"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results
path: TestResults
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Set run permissions
id: set-perms
run: |
chmod +x ./build/version.sh
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: yarn run version ${{ env.SERILOG_EXPRESSIONS_FORMATTING_PACKAGE_JSON }} ${{ env.SERILOG_EXPRESSIONS_FORMATTING_CSPROJ }} "alexaka1.serilog.extensions.formatting"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
if: steps.changesets.outputs.hasChangesets == 'false' && steps.changesets.outputs.versionExists == 'false'
# You can do something when a publish should happen.
run: |
echo "Publishing to nuget"
dotnet pack src/Serilog.Extensions.Formatting -c Release --version-suffix beta -o ./artifacts