Skip to content

v0.2.0

v0.2.0 #1

Workflow file for this run

name: Publish FastText.NetWrapper
on:
release:
types:
- published # Run the workflow when a new GitHub release is published
workflow_dispatch: # Allow manual triggering from the GitHub UI
# Set permissions for the workflow.
permissions:
contents: write
packages: write
checks: write
pull-requests: write
id-token: write # Required for NuGet trusted publishing (OIDC)
jobs:
build:
uses: ./.github/workflows/ci.yml
publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Package
uses: actions/download-artifact@v4.1.3
with:
name: artifacts
path: bin/artifacts/
- name: Publish NuGet Packages to GitHub Packages
run: dotnet nuget push bin/artifacts/**/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate
- name: NuGet login (OIDC → temp API key)
if: github.event_name == 'release'
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Publish NuGet package
if: github.event_name == 'release'
run: dotnet nuget push bin/artifacts/**/*.nupkg --api-key "${{ steps.login.outputs.apiKey }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate