Skip to content

Commit 8e55046

Browse files
committed
Update build process for Octopus fork package push
1 parent 50d6978 commit 8e55046

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ jobs:
3232
retention-days: 7
3333
- name: Verify trimming compatibility
3434
run: dotnet publish TrimmingTestApp
35+
3536
test:
3637
name: Test / ${{ matrix.os }} / ${{ matrix.arch }} / ${{ matrix.tfm }}
3738
runs-on: ${{ matrix.os }}
3839
strategy:
3940
matrix:
4041
arch: [ x64 ]
41-
os: [ windows-2019, windows-2022, macos-13 ]
42+
os: [ windows-2022, macos-13 ]
4243
tfm: [ net472, net8.0, net9.0 ]
4344
exclude:
4445
- os: macos-13
@@ -99,4 +100,21 @@ jobs:
99100
git_command="git config --global --add safe.directory /app"
100101
test_command="dotnet test LibGit2Sharp.sln --configuration Release -p:TargetFrameworks=${{ matrix.tfm }} --logger "GitHubActions" -p:ExtraDefine=LEAKS_IDENTIFYING"
101102
docker run -t --rm --platform linux/${{ matrix.arch }} -v "$PWD:/app" -e OPENSSL_ENABLE_SHA1_SIGNATURES=1 gittools/build-images:${{ matrix.distro }}-sdk-${{ matrix.sdk }} sh -c "$git_command && $test_command"
102-
103+
104+
nuget-push:
105+
name: Octopus NuGet Push
106+
needs: [build, test, test-linux]
107+
# && github.ref == 'refs/heads/octopus/master'
108+
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' && github.event_name != 'schedule'
109+
runs-on: ubuntu-22.04
110+
steps:
111+
- uses: actions/download-artifact@v4
112+
with:
113+
path: staging
114+
- name: Push package to feed 🐙
115+
id: push-feed
116+
shell: bash
117+
env:
118+
FEED_API_KEY: ${{ secrets.FEED_API_KEY }}
119+
FEED_SOURCE: ${{ secrets.FEED_SOURCE }}
120+
run: dotnet nuget push staging/**/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE"

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
<PackageReadmeFile>App_Readme/README.md</PackageReadmeFile>
2020
<PackageLicenseFile>App_Readme/LICENSE.md</PackageLicenseFile>
2121
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
22+
<PackageId>Octopus.LibGit2Sharp</PackageId>
2223
<PackageOutputPath>$(ArtifactsPath)\package</PackageOutputPath>
23-
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
24+
<MinVerDefaultPreReleaseIdentifiers>octopus.0</MinVerDefaultPreReleaseIdentifiers>
2425
<MinVerBuildMetadata Condition="'$(libgit2_hash)' != ''">libgit2-$(libgit2_hash.Substring(0,7))</MinVerBuildMetadata>
2526
</PropertyGroup>
2627

0 commit comments

Comments
 (0)