Updated Linux image for CI #48
Workflow file for this run
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
name: Release NuGet package | |
on: | |
push: | |
tags: | |
- '1.*' | |
jobs: | |
build_linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: olegtarasov/get-tag@v2.1.3 | |
- uses: nuget/setup-nuget@v2 | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
cmake --build . --config Release --target fasttext-shared fasttext-api-test | |
- name: Run tests | |
run: ./build/fasttext-test | |
- name: Make Nuget package | |
env: | |
APITOKEN: ${{ secrets.NugetToken }} | |
run: | | |
cd nuget | |
nuget pack FastText.Native.Linux.nuspec -Version $GIT_TAG_NAME | |
nuget push FastText.Native.Linux*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $APITOKEN | |
build_macos: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: olegtarasov/get-tag@v2.1.3 | |
- uses: nuget/setup-nuget@v2 | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
cmake --build . --config Release --target fasttext-shared fasttext-api-test | |
- name: Run tests | |
run: ./build/fasttext-test | |
- name: Make Nuget package | |
env: | |
APITOKEN: ${{ secrets.NugetToken }} | |
run: | | |
cd nuget | |
nuget pack FastText.Native.MacOs.nuspec -Version $GIT_TAG_NAME | |
nuget push FastText.Native.MacOs*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $APITOKEN | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: olegtarasov/get-tag@v2.1.3 | |
- uses: nuget/setup-nuget@v2 | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. | |
cmake --build . --config Release --target fasttext-shared fasttext-api-test | |
- name: Run tests | |
run: .\build\Release\fasttext-test.exe | |
- name: Make Nuget package | |
env: | |
APITOKEN: ${{ secrets.NugetToken }} | |
run: | | |
cd nuget | |
nuget pack FastText.Native.Windows.nuspec -Version $env:GIT_TAG_NAME | |
nuget push FastText.Native.Windows*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $env:APITOKEN -NoSymbols |