Skip to content

chore(deps): update actions/setup-node action to v6 #78

chore(deps): update actions/setup-node action to v6

chore(deps): update actions/setup-node action to v6 #78

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
issues: write
checks: write
pull-requests: write
jobs:
get-version:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-build
cancel-in-progress: true
outputs:
tag: ${{ steps.tag.outputs.new_tag }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get version
id: tag
#uses: anothrNick/[email protected]
uses: rorybartie/github-tag-action@bugfix/duplicate-prefix-on-prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_PREFIX: v
DEFAULT_BUMP: patch
MAJOR_STRING_TOKEN: feat!
MINOR_STRING_TOKEN: feat
PRERELEASE: ${{ !!github.event.pull_request }}
PRERELEASE_SUFFIX: prerelease
VERBOSE: true
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-build
cancel-in-progress: true
needs: get-version
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.0.x'
- uses: actions/setup-node@v6
with:
node-version: 22
- name: Setup tools
run: |
npm install -g bats
- name: Tests
run: |
mkdir test-results
bats . --verbose-run --print-output-on-failure --report-formatter junit --output test-results
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
test-results/*.xml
- name: Restore dependencies
run: dotnet restore
- name: Build package
env:
VERSION: ${{ needs.get-version.outputs.tag }}
run: |
dotnet build --configuration Release --no-restore -p:Version=${VERSION:1}
- name: Add NuGet source
if: ${{ !github.event.pull_request }}
env:
NUGET_USERNAME: ${{ vars.NUGET_USERNAME }}
NUGET_PASSWORD: ${{ secrets.NUGET_PASSWORD }}
run: dotnet nuget add source --username ${NUGET_USERNAME} --password ${NUGET_PASSWORD} --store-password-in-clear-text --name nuget "https://nuget.pkg.github.com/${NUGET_USERNAME}/index.json"
- name: Publish package
if: ${{ !github.event.pull_request }}
env:
VERSION: ${{ needs.get-version.outputs.tag }}
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
run: |
dotnet nuget push "bin/Release/*.nupkg" --api-key ${NUGET_APIKEY} --source https://api.nuget.org/v3/index.json --skip-duplicate