Skip to content

Merge pull request #2 from oocx/dependabot/github_actions/actions/set… #3

Merge pull request #2 from oocx/dependabot/github_actions/actions/set…

Merge pull request #2 from oocx/dependabot/github_actions/actions/set… #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
permissions:
contents: write
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal
version:
name: Version and Tag
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Install Versionize
run: dotnet tool install --global Versionize
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Versionize
id: versionize
run: |
versionize --exit-insignificant-commits --skip-dirty
echo "version_bumped=true" >> $GITHUB_OUTPUT
continue-on-error: true
- name: Push changes
if: steps.versionize.outcome == 'success'
run: git push --follow-tags