-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
- name: Build Test | ||
run: dotnet build ProjBobcat/ProjBobcat.sln -c Release --no-restore | ||
publish-package: | ||
name: Publish package | ||
name: Publish PreRelease package | ||
runs-on: windows-latest | ||
needs: [test-build] | ||
if: needs.test-build.result == 'success' | ||
|
@@ -29,15 +29,18 @@ jobs: | |
with: | ||
dotnet-version: 8.0 | ||
- uses: actions/checkout@v4 | ||
- name: Get Current Time | ||
id: current-time | ||
uses: josStorer/get-[email protected] | ||
- name: Get previous tag | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
with: | ||
format: YYYYMMDD-HHmmss | ||
utcOffset: "+08:00" | ||
fallback: 0.0.0 | ||
- name: Fix version tag | ||
run: echo ::set-env name=PREVIOUS_TAG::${{ steps.previoustag.outputs.tag }} | ||
- name: Restore packages | ||
run: dotnet restore ProjBobcat/ProjBobcat.sln | ||
- name: Build the project | ||
run: dotnet build ProjBobcat/ProjBobcat.sln -c Release --no-restore | ||
- name: Create the package | ||
run: dotnet pack ProjBobcat/ProjBobcat.sln -c Release -p:PackageVersion=beta-${{ steps.current-time.outputs.formattedTime }}-${{github.sha}}" | ||
run: $tag="${{ steps.previoustag.outputs.tag }}".replace("v",""); dotnet pack ProjBobcat/ProjBobcat.sln -c Release -p:PackageVersion="$tag-(CI)${{ github.sha }}-beta" --no-build --no-restore | ||
- name: Publish the package to NuGet.org | ||
run: dotnet nuget push -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json "ProjBobcat/ProjBobcat/bin/Release/*.nupkg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters