test build from diffrent project
Some checks failed
Spellcheck / Spellcheck (push) Failing after 31s
Tests / Evaluate Tests on ubuntu-latest (push) Successful in 2m17s

This commit is contained in:
2026-04-13 13:11:50 -04:00
parent d753ce67c3
commit 048ea69d47

View File

@@ -64,43 +64,84 @@ jobs:
# Use the .NET SDK from global.json in the root of the repository. # Use the .NET SDK from global.json in the root of the repository.
global-json-file: global.json global-json-file: global.json
# Write version to file so .NET will build correct version. # Write version to file so .NET will build correct version.
- name: Write Version to File # - name: Write Version to File
uses: jacobtomlinson/gha-find-replace@v3 # uses: jacobtomlinson/gha-find-replace@v3
with: # with:
find: "0.0.0-devbuild" # find: "0.0.0-devbuild"
replace: ${{ steps.next-version.outputs.version }} # replace: ${{ steps.next-version.outputs.version }}
regex: false # regex: false
include: GodotHelper/GodotHelper.csproj # include: GodotHelper/GodotHelper.csproj
# - name: Build
# working-directory: GodotHelper
# run: dotnet build -c Release
# - name: Get Package Path
# id: package-path
# run: |
# package=$(find ./GodotHelper/nupkg -name "*.nupkg")
# echo "package=$package" >> "$GITHUB_OUTPUT"
# echo "Found package: $package"
# echo "${{ steps.package-path.outputs.package }}"
# # - name: Create Release
# # run: |
# # version="${{ steps.next-version.outputs.version }}"
# # curl -X POST "http://192.168.1.4:3000/api/packages/Ronnie/GodotHelpers/releases" \
# # -H "Authorization: token ${{ secrets.GH_BASIC }}" \
# # -H "Content-Type: application/json" \
# # -d "{
# # \"tag_name\": \"$version\",
# # \"name\": \"v$version\",
# # \"body\": \"Auto release $version\"
# # }"
# - name: Publish to Nuget
# run: |
# dotnet nuget push "${{ steps.package-path.outputs.package }}" \
# --source "gitea:3000/api/packages/Ronnie/nuget/index.json" \
# --allow-insecure-connections \
# --api-key "${{ secrets.NUGET_KEY }}" \
# --skip-duplicate
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore
- name: Calculate Version
id: version
run: |
TAG=$(git describe --tags --abbrev=0)
COMMITS=$(git rev-list $TAG..HEAD --count)
BASE=${TAG#v}
IFS='.' read MAJOR MINOR PATCH <<< "$BASE"
NEW_PATCH=$((PATCH + COMMITS))
VERSION="$MAJOR.$MINOR.$NEW_PATCH"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build - name: Build
working-directory: GodotHelper
run: dotnet build -c Release run: dotnet build -c Release
- name: Get Package Path - name: Pack
id: package-path
run: | run: |
package=$(find ./GodotHelper/nupkg -name "*.nupkg") dotnet pack \
echo "package=$package" >> "$GITHUB_OUTPUT" -p:PackageVersion=${{ steps.version.outputs.VERSION }} \
echo "Found package: $package" -c Release
echo "${{ steps.package-path.outputs.package }}"
- name: Create Release - name: Publish
run: | run: |
version="${{ steps.next-version.outputs.version }}" dotnet nuget push ./bin/Release/*.nupkg \
curl -X POST "http://192.168.1.4:3000/api/packages/Ronnie/GodotHelpers/releases" \
-H "Authorization: token ${{ secrets.GH_BASIC }}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"$version\",
\"name\": \"v$version\",
\"body\": \"Auto release $version\"
}"
- name: Publish to Nuget
run: |
dotnet nuget push "${{ steps.package-path.outputs.package }}" \
--source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \ --source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \
--allow-insecure-connections \ --allow-insecure-connections \
--api-key "${{ secrets.NUGET_KEY }}" \ --api-key "${{ secrets.NUGET_KEY }}" \
--skip-duplicate --skip-duplicate