Skip to content

Update GitHub Actions to latest Node.js 24 versions #4

Update GitHub Actions to latest Node.js 24 versions

Update GitHub Actions to latest Node.js 24 versions #4

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['[0-9]*.[0-9]*.[0-9]*']
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Pack
run: dotnet pack Mapbox.Api/Mapbox.Api.csproj --no-build --configuration Release --output ./artifacts
- name: Upload NuGet artifact
uses: actions/upload-artifact@v7
with:
name: nuget
path: |
./artifacts/*.nupkg
./artifacts/*.snupkg
publish:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: nuget
path: ./artifacts
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: NuGet login (Trusted Publishing)
uses: NuGet/login@v1
id: login
with:
user: david_n_m_bond
- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate