ci: add dependabot-automerge.yml (#68) #36
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: main | |
on: | |
push: | |
branches: [ main ] | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore .NET dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release --no-restore | |
- name: Test | |
run: dotnet test -c Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings ./Xyaneon.Games.Dice.Test/coverlet.runsettings | |
# Workaround for issue: https://github.com/microsoft/vstest/issues/2378 | |
- name: Relocate test coverage results | |
run: mv ./Xyaneon.Games.Dice.Test/TestResults/**/coverage.info ./Xyaneon.Games.Dice.Test/TestResults/ | |
- name: Upload coverage file to Coveralls.io | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./Xyaneon.Games.Dice.Test/TestResults/coverage.info | |
format: lcov | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install Node dependencies | |
run: npm ci | |
- name: Semantic Release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} | |
run: npx semantic-release |