File tree 3 files changed +95
-1
lines changed
3 files changed +95
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Pull Request
2
+
3
+ on :
4
+ pull_request :
5
+ paths-ignore :
6
+ - .github/workflows/*
7
+ - .gitignore
8
+ - idea/*
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : windows-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ - name : Setup .NET
17
+ uses : actions/setup-dotnet@v3
18
+ with :
19
+ dotnet-version : 7.0.x
20
+ - name : get version
21
+ id : version
22
+ uses : notiz-dev/github-action-json-property@release
23
+ with :
24
+ path : ' plugin.json'
25
+ prop_path : ' Version'
26
+ - run : echo ${{steps.version.outputs.prop}}
27
+ - name : Build
28
+ run : |
29
+ dotnet publish 'Flow.Launcher.Plugin.Add2Path.csproj' -c Release -r win-x64 --no-self-contained -o "Add2Path-${{steps.version.outputs.prop}}"
30
+ - name : Upload Artifact
31
+ uses : actions/upload-artifact@v2
32
+ with :
33
+ name : ' Add2Path-${{steps.version.outputs.prop}}'
34
+ path : ' Add2Path-${{steps.version.outputs.prop}}'
Original file line number Diff line number Diff line change
1
+ name : Publish Release
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ paths-ignore :
7
+ - .github/workflows/*
8
+ - .gitignore
9
+ - idea/*
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ publish :
14
+ runs-on : windows-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ - name : Fetch latest release version
19
+ id : fetch-latest-release
20
+
21
+ - name : Get updated version
22
+ id : updated-version
23
+ uses : notiz-dev/github-action-json-property@release
24
+ with :
25
+ path : ' plugin.json'
26
+ prop_path : ' Version'
27
+ - name : Determine if publish release required
28
+ id : publish-release
29
+ run : |
30
+ $updated_ver="${{steps.updated-version.outputs.prop}}"
31
+ $release_ver="${{ steps.fetch-latest-release.outputs.latest-release }}".replace('v','')
32
+ if ($updated_ver -ne $release_ver -and "${{github.ref_name}}" -eq 'master') {
33
+ echo "::set-output name=required::true"
34
+ }
35
+ echo "Updated version is $updated_ver"
36
+ echo "Release version is $release_ver"
37
+ - name : Setup .NET
38
+ uses : actions/setup-dotnet@v3
39
+ with :
40
+ dotnet-version : 7.0.x
41
+ - name : Get version
42
+ id : version
43
+ uses : notiz-dev/github-action-json-property@release
44
+ with :
45
+ path : ' plugin.json'
46
+ prop_path : ' Version'
47
+ - run : echo ${{steps.version.outputs.prop}}
48
+ - name : Build
49
+ run : |
50
+ dotnet publish 'Flow.Launcher.Plugin.Add2Path.csproj' -r win-x64 -c Release -o "Flow.Launcher.Plugin.Add2Path"
51
+ 7z a -tzip "Add2Path-${{steps.version.outputs.prop}}.zip" "./Flow.Launcher.Plugin.Add2Path/*"
52
+ - name : Publish
53
+ uses : softprops/action-gh-release@v1
54
+ if : steps.publish-release.outputs.required == 'true'
55
+ with :
56
+ files : " Add2Path-${{steps.version.outputs.prop}}.zip"
57
+ tag_name : " v${{steps.version.outputs.prop}}"
58
+ env :
59
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
+
Original file line number Diff line number Diff line change 4
4
"Name" : " Add2Path" ,
5
5
"Description" : " Manage your PATH environment variable" ,
6
6
"Author" : " HorridModz" ,
7
- "Version" : " 2.0.0 " ,
7
+ "Version" : " 2.0.1 " ,
8
8
"Language" : " csharp" ,
9
9
"Website" : " https://github.com/HorridModz/Flow.Launcher.Plugin.Add2Path" ,
10
10
"IcoPath" : " icon.png" ,
You can’t perform that action at this time.
0 commit comments