Skip to content

Merge pull request #6 from wlsnmrk/remove-deprecated-pressure #6

Merge pull request #6 from wlsnmrk/remove-deprecated-pressure

Merge pull request #6 from wlsnmrk/remove-deprecated-pressure #6

Workflow file for this run

name: '📦 Publish to Nuget'
# Whenever we push a v* tag we make a new release.
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*'
jobs:
publish:
name: '📦 Publish to Nuget'
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v3
name: 🧾 Checkout
- uses: actions/setup-dotnet@v3
name: 💽 Setup .NET SDK
with:
# Use the .NET SDK from global.json in the root of the repository.
global-json-file: global.json
- name: 🔍 Get Tag from Version
id: tag_version
run: |
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: 📝 Write Version to File
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "0.0.0-devbuild"
replace: ${{steps.tag_version.outputs.TAG_VERSION}}
regex: false
include: GodotTestDriver/GodotTestDriver.csproj
- name: 📦 Publish
id: publish_nuget
run: |
dotnet build GodotTestDriver/GodotTestDriver.csproj -c Release
# find the built nuget package
nuget_package=$(find . -name "Chickensoft.GodotTestDriver.*.nupkg")
echo "📦 Nuget package: $nuget_package"
# publish the nuget package, with symbols
dotnet nuget push "$nuget_package" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate