Skip to content

fix: prepare for publishing #5

fix: prepare for publishing

fix: prepare for publishing #5

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
# Add permissions for creating releases
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'plugin.json'
prop_path: 'Version'
- run: echo ${{steps.version.outputs.prop}}
- name: Restore
run: |
dotnet restore
- name: Build
run: |
dotnet publish -c Release -r win-x64 --no-self-contained Flow.Launcher.Plugin.KubernetesContextSwitcher.csproj
7z a -tzip "Flow.Launcher.Plugin.KubernetesContextSwitcher.zip" "./bin/Release/net7.0-windows7.0/win-x64/publish/*"
- name: Publish
uses: softprops/action-gh-release@v2
with:
files: "Flow.Launcher.Plugin.KubernetesContextSwitcher.zip"
tag_name: "v${{steps.version.outputs.prop}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}