Skip to content

build: Update Nuke project to net9.0 #111

build: Update Nuke project to net9.0

build: Update Nuke project to net9.0 #111

name: CI/CD
on:
workflow_dispatch:
push:
branches: [ develop, master ]
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint commits
uses: wagoid/commitlint-github-action@v6
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Get semantic release version
uses: cycjimmy/semantic-release-action@v4
id: semantic_dry
with:
semantic_version: 23
dry_run: true
extra_plugins: |
@semantic-release/exec@6.0.3
conventional-changelog-conventionalcommits@7.0.2
outputs:
new_release_published: ${{ steps.semantic_dry.outputs.new_release_published }}
new_release_version: ${{ steps.semantic_dry.outputs.new_release_version }}
test:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Run unit tests
run: ./build.sh --target test --no-logo
release:
needs: [version, test]
if: needs.version.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Semantic release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
semantic_version: 23
extra_plugins: |
@semantic-release/exec@6.0.3
conventional-changelog-conventionalcommits@7.0.2