Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LeLocTai committed Sep 1, 2022
1 parent e513644 commit 0a2f697
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish

on:
push:
branches: [ master ]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.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: Build
run: |
dotnet publish -c Release -r win-x64 Flow.Launcher.Plugin.UnityEngine.csproj
7z a -tzip "Flow.Launcher.Plugin.UnityEngine.zip" "./bin/Release/win-x64/publish/*"
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "Flow.Launcher.Plugin.UnityEngine.zip"
tag_name: "v${{steps.version.outputs.prop}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions Flow.Launcher.Plugin.UnityEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
</PropertyGroup>

<ItemGroup>
<Content Include=".github\workflows\publish.yml" />
<Content Include="plugin.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down

0 comments on commit 0a2f697

Please sign in to comment.