diff --git a/.woodpecker.yml b/.woodpecker.yml index 3f25d63..3c41422 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -10,20 +10,14 @@ pipeline: commands: - nix develop --command scripts/build.sh when: - event: [push, pull_request, tag] - tag: v* + event: [push, pull_request, manual] test: image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest commands: - nix develop --command scripts/test.sh when: - event: [push, pull_request] - #paths: - # - ./**/*test-result.xml - # - ./coverage/Cobertura.xml - # - ./coverage/Summary.* - # - ./**/*.nupkg + event: [push, pull_request, manual] release-main: image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest diff --git a/scripts/release.sh b/scripts/release.sh index 94ed900..8cd82da 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -13,6 +13,7 @@ fi # Clean up everything from the previous runs. echo "$(basename $0): cleaning project" dotnet clean +rm -f src/*/bin/Debug/*.nupkg # Version the file based on the Git repository. echo "$(basename $0): setting project version" @@ -35,8 +36,8 @@ dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg || exit 1 echo "$(basename $0): publishing NuGet package" dotnet nuget remove source mfgames.com >& /dev/null -dotnet nuget add source --name mfgames.com --username dmoonfire --password $GITEA_TOKEN https://src.mfgames.com/api/packages/mfgames-cil/nuget/index.json --store-password-in-clear-text || exit 1 -dotnet nuget push --skip-duplicate --source mfgames.com src/*/bin/Debug/*.nupkg || exit 1 +dotnet nuget add source --name mfgames.com https://src.mfgames.com/api/packages/mfgames-cil/nuget/index.json || exit 1 +dotnet nuget push --api-key $GITEA_TOKEN --skip-duplicate --source mfgames.com src/*/bin/Debug/*.nupkg || exit 1 # Tag and push, but only if we don't have a tag. if ! git tag | grep $SEMVER >& /dev/null