This commit is contained in:
@@ -8,20 +8,18 @@ env:
|
|||||||
PACKAGE_OWNER: ${{ github.repository_owner }}
|
PACKAGE_OWNER: ${{ github.repository_owner }}
|
||||||
PACKAGE_NAME: AspNetCore.Identity.MongoDbCore.${{ env.PACKAGE_VERSION }}.nupkg
|
PACKAGE_NAME: AspNetCore.Identity.MongoDbCore.${{ env.PACKAGE_VERSION }}.nupkg
|
||||||
PACKAGE_SOURCE: https://git.home.cuco.li/api/packages/${{ env.PACKAGE_OWNER }}/nuget/index.json
|
PACKAGE_SOURCE: https://git.home.cuco.li/api/packages/${{ env.PACKAGE_OWNER }}/nuget/index.json
|
||||||
PACKAGE_TOKEN: ${{ github.token }}
|
PACKAGE_TOKEN: ${{ secrets.PACKAGE_PUSH_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v2
|
- uses: actions/setup-dotnet@v4
|
||||||
#- name: Set VERSION variable from tag
|
with:
|
||||||
# run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
dotnet-version: '8.x.x'
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: dotnet pack --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --output .
|
run: dotnet pack --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --output .
|
||||||
- name: Push
|
- name: Push
|
||||||
run: dotnet nuget push ${{ env.PACKAGE_NAME }} --source ${{ env.PACKAGE_SOURCE }} --api-key ${GITHUB_TOKEN}
|
run: dotnet nuget push ${{ env.PACKAGE_NAME }} --source ${{ env.PACKAGE_SOURCE }} --api-key ${{ env.PACKAGE_TOKEN }}
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ env.PACKAGE_TOKEN }}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
|
|
||||||
trigger:
|
|
||||||
- master
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
variables:
|
|
||||||
solution: '**/*.sln'
|
|
||||||
buildPlatform: 'Any CPU'
|
|
||||||
buildConfiguration: 'Release'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Install .net core 3.1'
|
|
||||||
inputs:
|
|
||||||
packageType: 'sdk'
|
|
||||||
version: '3.1.101'
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: 'Restore Library Dependencies'
|
|
||||||
inputs:
|
|
||||||
restoreSolution: '$(solution)'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Build Library'
|
|
||||||
inputs:
|
|
||||||
command: 'build'
|
|
||||||
projects: './src/AspNetCore.Identity.MongoDbCore.csproj'
|
|
||||||
arguments: '--configuration $(buildConfiguration)'
|
|
||||||
|
|
||||||
# - task: DotNetCoreCLI@2
|
|
||||||
# displayName: 'Test Library'
|
|
||||||
# inputs:
|
|
||||||
# command: 'test'
|
|
||||||
# projects: './test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.IntegrationTests.csproj'
|
|
||||||
# arguments: '--configuration $(buildConfiguration)'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Package Library (nuget)'
|
|
||||||
inputs:
|
|
||||||
command: 'custom'
|
|
||||||
projects: './src/AspNetCore.Identity.MongoDbCore.csproj'
|
|
||||||
custom: 'pack'
|
|
||||||
arguments: '--no-build -p:NuspecFile=AspNetCore.Identity.MongoDbCore.nuspec -o $(build.artifactStagingDirectory)/Nuget'
|
|
||||||
verbosityPack: 'Detailed'
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: 'Publish Library'
|
|
||||||
inputs:
|
|
||||||
command: 'push'
|
|
||||||
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
|
|
||||||
nuGetFeedType: 'internal'
|
|
||||||
publishVstsFeed: '72ef5435-c019-4338-8d35-7c3caec78f2a'
|
|
||||||
verbosityPush: 'Normal'
|
|
||||||
Reference in New Issue
Block a user