Skip to content

Commit 9c52fed

Browse files
committed
Change stratergy, to skip duplicate
1 parent b0bd7e2 commit 9c52fed

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,6 @@ jobs:
3030
uses: actions/setup-dotnet@v4.0.0
3131
with:
3232
dotnet-version: 9.0.x
33-
- name: Set version
34-
run: |
35-
if ("${{ github.event_name }}" -eq "schedule" -or "${{ inputs.nightly }}" -eq "true") {
36-
# Nightly build - override with specific format
37-
$gitVersion = git describe --tags --abbrev=0 2>$null
38-
if ($gitVersion -match '^v?(\d+\.\d+\.\d+)') {
39-
$baseVersion = $matches[1]
40-
} else {
41-
$baseVersion = "0.32.0"
42-
}
43-
$version = "$baseVersion-octopus-nightly-${{ github.run_number }}"
44-
Write-Host "Setting nightly version to: $version"
45-
"MINVERVERSIONOVERRIDE=$version" >> $env:GITHUB_ENV
46-
} else {
47-
# Regular build - let MinVer calculate from tags/height, just ensure octopus is in default
48-
Write-Host "Using MinVer with default pre-release: octopus.${{ github.run_number }}"
49-
"MINVERDEFAULTPRERELEASEIDENTIFIERS=octopus.${{ github.run_number }}" >> $env:GITHUB_ENV
50-
}
51-
shell: pwsh
5233
- name: Build
5334
run: dotnet build LibGit2Sharp.sln --configuration Release
5435
- name: Show version
@@ -136,15 +117,23 @@ jobs:
136117
nuget-push:
137118
name: Octopus NuGet Push
138119
needs: [build, test, test-linux]
139-
# && github.ref == 'refs/heads/octopus/master'
140-
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' && github.event_name != 'schedule'
120+
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
141121
runs-on: ubuntu-22.04
142122
steps:
143123
- uses: actions/download-artifact@v4
144124
with:
145125
path: staging
146-
- name: Push package to feed 🐙
147-
id: push-feed
126+
- name: Push package to feed 🐙 (nightly)
127+
if: github.event_name == 'schedule' || inputs.nightly
128+
id: push-feed-nightly
129+
shell: bash
130+
env:
131+
FEED_API_KEY: ${{ secrets.FEED_API_KEY }}
132+
FEED_SOURCE: ${{ secrets.FEED_SOURCE }}
133+
run: dotnet nuget push staging/**/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE" --skip-duplicate
134+
- name: Push package to feed 🐙 (regular)
135+
if: github.event_name != 'schedule' && !inputs.nightly
136+
id: push-feed-regular
148137
shell: bash
149138
env:
150139
FEED_API_KEY: ${{ secrets.FEED_API_KEY }}

0 commit comments

Comments
 (0)