2024-10-01 23:18:55 -04:00
|
|
|
name: build-packages
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-10-01 23:19:36 -04:00
|
|
|
- 'master'
|
2024-10-01 23:18:55 -04:00
|
|
|
jobs:
|
2024-10-01 23:20:11 -04:00
|
|
|
meilisearch-dotnet-packages:
|
2024-10-01 23:18:55 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOTNET_INSTALL_DIR: "/home/runner"
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
|
|
|
steps:
|
|
|
|
- name: 'Cleanup build folder'
|
|
|
|
run: |
|
|
|
|
rm ./* -r || true
|
|
|
|
rm ./.??* -r || true
|
2025-02-24 07:55:38 +00:00
|
|
|
|
|
|
|
- uses: actions/setup-dotnet@v3
|
|
|
|
with:
|
|
|
|
dotnet-version: 8.0.x
|
|
|
|
|
2024-10-01 23:18:55 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- uses: gittools/actions/gitversion/setup@v1.1.1
|
|
|
|
with:
|
|
|
|
versionSpec: '5.x'
|
|
|
|
- uses: gittools/actions/gitversion/execute@v1.1.1
|
|
|
|
with:
|
|
|
|
useConfigFile: true
|
|
|
|
configFilePath: GitVersion.yml
|
|
|
|
- name: Tag branch
|
|
|
|
run: |
|
|
|
|
git tag $GitVersion_SemVer
|
|
|
|
git push origin $GitVersion_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
|
|
|
|
uses: vers-one/dotnet-project-version-updater@v1.6
|
|
|
|
with:
|
2024-10-01 23:20:53 -04:00
|
|
|
file: "./meilisearch.NET/meilisearch.NET.csproj"
|
2024-10-01 23:18:55 -04:00
|
|
|
version: ${{ env.GitVersion_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
|
2025-02-24 08:13:45 +00:00
|
|
|
- run: dotnet nuget push **/*.nupkg --skip-duplicate -s "https://git.d4m13n.dev/api/packages/damien/nuget/index.json" --api-key ${{secrets.PACKAGE_TOKEN}}
|