-
Notifications
You must be signed in to change notification settings - Fork 336
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
1 parent
cbf569e
commit c78ffd6
Showing
3 changed files
with
64 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Publish CoreLib and Client Lib to ADO feed | ||
name: Publish CoreLib and Client Lib to ADO feed | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dotnet-version: ['7.0.x'] | ||
|
||
environment: publish-sm-preview-packages-to-ado | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
clean: true | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
source-url: ${{ secrets.AZURE_ARTIFACTS_FEED_URL }} | ||
env: | ||
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_PAT }} | ||
|
||
- name: Show Run and Attempt IDs | ||
run: | | ||
echo "Run ID: ${{ github.run_number }}" | ||
echo "Attempt ID: ${{ github.run_attempt }}" | ||
echo "Version: 0.0.${{ github.run_number }}.${{ github.run_attempt }}" | ||
echo "VersionPrefix=0.0.${{ github.run_number }}.${{ github.run_attempt }}" >> $GITHUB_ENV | ||
- name: Build and pack Client NuGet package | ||
run: | | ||
dotnet pack dotnet/ClientLib/ClientLib.csproj \ | ||
-c Release \ | ||
-v normal \ | ||
--version-suffix preview \ | ||
-p:VersionPrefix=${{ env.VersionPrefix }} \ | ||
--output dotnet/ClientLib/bin/Release | ||
- name: Build and pack Core NuGet package | ||
run: | | ||
dotnet pack dotnet/CoreLib/CoreLib.csproj \ | ||
-c Release \ | ||
-v normal \ | ||
--version-suffix preview \ | ||
-p:VersionPrefix=${{ env.VersionPrefix }} \ | ||
--output dotnet/CoreLib/bin/Release | ||
- name: Push Client NuGet package to ADO feed | ||
run: dotnet nuget push dotnet/ClientLib/bin/Release/*.nupkg --api-key az | ||
|
||
- name: Push Core NuGet package to ADO feed | ||
run: dotnet nuget push dotnet/CoreLib/bin/Release/*.nupkg --api-key az |
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
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