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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
meilisearch-dotnet-packages:
|
||||
runs-on: ubuntu-latest
|
||||
@ -11,48 +13,61 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: 'Cleanup build folder'
|
||||
- name: Cleanup build folder
|
||||
run: |
|
||||
rm ./* -r || true
|
||||
rm ./.??* -r || true
|
||||
|
||||
- uses: actions/setup-dotnet@v3
|
||||
rm -rf ./* ./.??* || true
|
||||
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: gittools/actions/gitversion/setup@v1.1.1
|
||||
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v1.1.1
|
||||
with:
|
||||
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:
|
||||
useConfigFile: true
|
||||
configFilePath: GitVersion.yml
|
||||
- name: Tag branch
|
||||
|
||||
- name: Tag repository
|
||||
run: |
|
||||
git tag $GitVersion_SemVer
|
||||
git push origin $GitVersion_SemVer
|
||||
git tag ${{ steps.gitversion.outputs.SemVer }}
|
||||
git push origin ${{ steps.gitversion.outputs.SemVer }}
|
||||
|
||||
- name: Set up GitVersion
|
||||
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
|
||||
- name: Update package version
|
||||
uses: vers-one/dotnet-project-version-updater@v1.6
|
||||
with:
|
||||
file: "./meilisearch.NET/meilisearch.NET.csproj"
|
||||
version: ${{ env.GitVersion_SemVer }}
|
||||
version: ${{ steps.gitversion.outputs.SemVer }}
|
||||
|
||||
- run: dotnet build --configuration Release
|
||||
- run: dotnet pack ./meilisearch.NET/meilisearch.NET.csproj --output nuget-packages --configuration Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
|
||||
- run: dotnet nuget push **/*.nupkg --skip-duplicate -s "https://git.d4m13n.dev/api/packages/damien/nuget/index.json" --api-key ${{secrets.PACKAGE_TOKEN}}
|
||||
- name: Build and package
|
||||
run: |
|
||||
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