Skip to content

fix publish build

fix publish build #39

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*" # Publish on any new tag starting with v
jobs:
build:
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set tag version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
shell: bash
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
global-json-file: global.json
dotnet-version: |
8.x
9.x
- name: Restore tools
run: dotnet tool restore
- name: Pack the library
run: dotnet pack -c Release -o release src
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.get_version.outputs.VERSION }}
path: ./CHANGELOG.md
validation_level: warn
- name: Push the package to NuGet
run: dotnet nuget push release/Ionide.LanguageServerProtocol.${{ steps.get_version.outputs.VERSION }}.nupkg --source "$env:NUGET_SOURCE" --api-key "$env:NUGET_KEY"
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/*.nupkg
tag: ${{ github.ref }}
overwrite: true
file_glob: true