Update .github/workflows/on-push.yml
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				build-packages / meilisearch-dotnet-packages (push) Successful in 1m21s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	build-packages / meilisearch-dotnet-packages (push) Successful in 1m21s
				
			This commit is contained in:
		
							parent
							
								
									e589d51821
								
							
						
					
					
						commit
						d144bf4f3e
					
				
							
								
								
									
										69
									
								
								.github/workflows/on-push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										69
									
								
								.github/workflows/on-push.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,8 +1,10 @@ | |||||||
| name: build-packages | name: build-packages | ||||||
|  | 
 | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     branches:  |     branches:  | ||||||
|       - 'master' |       - 'master' | ||||||
|  | 
 | ||||||
| jobs: | jobs: | ||||||
|   meilisearch-dotnet-packages: |   meilisearch-dotnet-packages: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| @ -11,48 +13,61 @@ jobs: | |||||||
|     permissions: |     permissions: | ||||||
|       contents: write |       contents: write | ||||||
|       packages: write |       packages: write | ||||||
|  | 
 | ||||||
|     steps: |     steps: | ||||||
|       - name: 'Cleanup build folder' |       - name: Cleanup build folder | ||||||
|         run: | |         run: | | ||||||
|           rm ./* -r || true |           rm -rf ./* ./.??* || true | ||||||
|           rm ./.??* -r  || true | 
 | ||||||
|        |       - name: Set up .NET | ||||||
|       - uses: actions/setup-dotnet@v3 |         uses: actions/setup-dotnet@v3 | ||||||
|         with: |         with: | ||||||
|           dotnet-version: 8.0.x |           dotnet-version: 8.0.x | ||||||
| 
 | 
 | ||||||
|       - uses: actions/checkout@v3 |       - name: Checkout repository | ||||||
|  |         uses: actions/checkout@v3 | ||||||
|         with: |         with: | ||||||
|           fetch-depth: 0 |           fetch-depth: 0 | ||||||
|            | 
 | ||||||
|       - uses: gittools/actions/gitversion/setup@v1.1.1 |       - name: Install GitVersion | ||||||
|  |         uses: gittools/actions/gitversion/setup@v1.1.1 | ||||||
|         with: |         with: | ||||||
|           versionSpec: '5.x' |           versionSpec: '5.x' | ||||||
|       - uses: gittools/actions/gitversion/execute@v1.1.1 | 
 | ||||||
|  |       - name: Determine version with GitVersion | ||||||
|  |         id: gitversion | ||||||
|  |         uses: gittools/actions/gitversion/execute@v1.1.1 | ||||||
|         with: |         with: | ||||||
|           useConfigFile: true |           useConfigFile: true | ||||||
|           configFilePath: GitVersion.yml |           configFilePath: GitVersion.yml | ||||||
|       - name: Tag branch | 
 | ||||||
|  |       - name: Tag repository | ||||||
|         run: | |         run: | | ||||||
|           git tag $GitVersion_SemVer |           git tag ${{ steps.gitversion.outputs.SemVer }} | ||||||
|           git push origin $GitVersion_SemVer |           git push origin ${{ steps.gitversion.outputs.SemVer }} | ||||||
| 
 | 
 | ||||||
|       - name: Set up GitVersion |       - name: Update package version | ||||||
|         uses: gittools/actions/gitversion/setup@v0.9.15 |  | ||||||
|         with: |  | ||||||
|           versionSpec: '5.x' |  | ||||||
|      |  | ||||||
|       - uses: gittools/actions/gitversion/execute@v0.9.15 |  | ||||||
|         with: |  | ||||||
|           useConfigFile: true |  | ||||||
|           configFilePath: GitVersion.yml |  | ||||||
| 
 |  | ||||||
|       - name: Set Package Version |  | ||||||
|         uses: vers-one/dotnet-project-version-updater@v1.6 |         uses: vers-one/dotnet-project-version-updater@v1.6 | ||||||
|         with: |         with: | ||||||
|           file: "./meilisearch.NET/meilisearch.NET.csproj" |           file: "./meilisearch.NET/meilisearch.NET.csproj" | ||||||
|           version: ${{ env.GitVersion_SemVer }} |           version: ${{ steps.gitversion.outputs.SemVer }} | ||||||
| 
 | 
 | ||||||
|       - run: dotnet build --configuration Release |       - name: Build and package | ||||||
|       - run: dotnet pack ./meilisearch.NET/meilisearch.NET.csproj --output nuget-packages --configuration Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg |         run: | | ||||||
|       - run: dotnet nuget push **/*.nupkg --skip-duplicate -s "https://git.d4m13n.dev/api/packages/damien/nuget/index.json" --api-key ${{secrets.PACKAGE_TOKEN}} |           dotnet build --configuration Release | ||||||
|  |           dotnet pack ./meilisearch.NET/meilisearch.NET.csproj --output nuget-packages --configuration Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg | ||||||
|  | 
 | ||||||
|  |       - name: Publish package to NuGet registry | ||||||
|  |         run: | | ||||||
|  |           dotnet nuget push nuget-packages/*.nupkg --skip-duplicate -s "https://git.d4m13n.dev/api/packages/damien/nuget/index.json" --api-key ${{ secrets.PACKAGE_TOKEN }} | ||||||
|  | 
 | ||||||
|  |       - name: Create GitHub Release | ||||||
|  |         uses: softprops/action-gh-release@v1 | ||||||
|  |         with: | ||||||
|  |           tag_name: ${{ steps.gitversion.outputs.SemVer }} | ||||||
|  |           name: Release ${{ steps.gitversion.outputs.SemVer }} | ||||||
|  |           body: "https://git.d4m13n.dev/damien/meilisearch.NET/packages  | ||||||
|  |           Automated release of MeiliSearch.NET version ${{ steps.gitversion.outputs.SemVer }}." | ||||||
|  |           files: nuget-packages/*.nupkg | ||||||
|  |           draft: false | ||||||
|  |           prerelease: false | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user