Fix dotnet run task #39
This file contains hidden or 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: publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
permissions: | |
contents: write | |
if: ${{ startsWith(github.event.head_commit.message, 'bump version to') }} | |
runs-on: windows-latest | |
env: | |
Project_Path: build\Build.csproj | |
steps: | |
# Checkout codes | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install the .NET Core workload | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
7.0.x | |
8.0.x | |
# Restore dependencies | |
- name: Restore dependencies | |
run: dotnet restore ${{ env.Project_Path }} | |
# Build the project | |
- name: Build | |
run: dotnet build ${{ env.Project_Path }} --configuration Release --no-restore | |
# Get package version | |
- name: Get Package Version | |
id: version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: "src/Flow.Launcher.Plugin.ClipboardPlus/plugin.json" | |
prop_path: "Version" | |
# Publish to GitHub releases | |
- name: Publish | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
**/Clipboard+*.zip | |
src/Flow.Launcher.Plugin.ClipboardPlus/plugin.json | |
tag_name: "v${{ steps.version.outputs.prop }}" |