more anoyed testing
This commit is contained in:
93
.github/workflows/release.yaml
vendored
93
.github/workflows/release.yaml
vendored
@@ -64,80 +64,41 @@ 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:
|
|
||||||
# find: "0.0.0-devbuild"
|
|
||||||
# replace: ${{ steps.next-version.outputs.version }}
|
|
||||||
# regex: false
|
|
||||||
# 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:
|
with:
|
||||||
dotnet-version: 10.0.x
|
find: "0.0.0-devbuild"
|
||||||
|
replace: ${{ steps.next-version.outputs.version }}
|
||||||
|
regex: false
|
||||||
|
include: GodotHelper/GodotHelper.csproj
|
||||||
|
|
||||||
- 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: Pack
|
- name: Get Package Path
|
||||||
|
id: package-path
|
||||||
run: |
|
run: |
|
||||||
dotnet pack \
|
package=$(find ./GodotHelper/nupkg -name "*.nupkg")
|
||||||
-p:PackageVersion=${{ steps.version.outputs.VERSION }} \
|
echo "package=$package" >> "$GITHUB_OUTPUT"
|
||||||
-c Release
|
echo "Found package: $package"
|
||||||
|
echo "${{ steps.package-path.outputs.package }}"
|
||||||
|
|
||||||
- name: Publish
|
- name: Create Release
|
||||||
run: |
|
run: |
|
||||||
dotnet nuget push ./bin/Release/*.nupkg \
|
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 "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 }}" \
|
||||||
|
|||||||
104
.github/workflows/test.yml
vendored
Normal file
104
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
name: Build NuGet
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- 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
|
||||||
|
run: dotnet build -c Release
|
||||||
|
|
||||||
|
- name: Pack
|
||||||
|
run: |
|
||||||
|
dotnet pack \
|
||||||
|
-p:PackageVersion=${{ steps.version.outputs.VERSION }} \
|
||||||
|
-c Release
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
run: |
|
||||||
|
dotnet nuget push GodotHelper/nupkg/*.nupkg \
|
||||||
|
--source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \
|
||||||
|
--allow-insecure-connections \
|
||||||
|
--api-key "${{ secrets.NUGET_KEY }}" \
|
||||||
|
--skip-duplicate
|
||||||
|
|
||||||
|
# name: Gitea Actions Demo
|
||||||
|
# run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
||||||
|
# on: [push]
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# Explore-Gitea-Actions:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
|
# - run: echo " This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
|
# - run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
# # with:
|
||||||
|
# # repository: Ronnie/SjkScripts
|
||||||
|
# # token: ${{ gitea.token }}
|
||||||
|
# # github-server-url: http://192.168.1.4:3000
|
||||||
|
# - run: echo " The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||||
|
# - run: echo " The workflow is now ready to test your code on the runner."
|
||||||
|
# - name: List files in the repository
|
||||||
|
# run: |
|
||||||
|
# ls ${{ gitea.workspace }}
|
||||||
|
# - run: echo " This job's status is ${{ job.status }}."
|
||||||
|
# - run: echo " HELP ME, I'M A GITHUB ACTION."
|
||||||
|
# - run: echo " HELP ME PLEASE."
|
||||||
|
# - run: echo " I'M SO TIRED."
|
||||||
|
# - run: echo " 9999999."
|
||||||
|
# name: Gitea Actions Demo
|
||||||
|
# run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
||||||
|
# on: [push]
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# Explore-Gitea-Actions:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
|
# - run: echo " This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
|
# - run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
|
# - name: Check out repository code
|
||||||
|
# run: |
|
||||||
|
# git clone http://192.168.1.4:3000/Ronnie/SjkScripts.git
|
||||||
|
# - run: echo " The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||||
|
# - run: echo " The workflow is now ready to test your code on the runner."
|
||||||
|
# - name: List files in the repository
|
||||||
|
# run: |
|
||||||
|
# ls ${{ gitea.workspace }}
|
||||||
|
# - run: echo " This job's status is ${{ job.status }}."
|
||||||
|
# - run: echo " HELP ME, I'M A GITHUB ACTION."
|
||||||
|
#e59e39d60f30b539ae594d8cfc7a9771883d2eb0
|
||||||
Reference in New Issue
Block a user