Skip to content

Commit 89917a3

Browse files
committed
move installer and release to tag action
1 parent 3dd37f4 commit 89917a3

File tree

2 files changed

+53
-27
lines changed

2 files changed

+53
-27
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Build
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
push: {}
75
pull_request: {}
86

97
jobs:
@@ -51,27 +49,3 @@ jobs:
5149
- name: Build PowerMateTray Release
5250
run: |
5351
MSBuild.exe PowerMateTray.sln -p:Configuration=Release
54-
55-
- name: Build Installer
56-
run: |
57-
cmd.exe /c call build_installer.bat
58-
59-
- name: Create Release
60-
id: create_release
61-
uses: actions/create-release@v1
62-
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64-
with:
65-
tag_name: ${{ github.ref }}
66-
release_name: Release ${{ github.ref }}
67-
draft: true
68-
69-
- name: Upload Release
70-
uses: actions/upload-release-asset@v1
71-
env:
72-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73-
with:
74-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
75-
asset_path: build/x64/Release/PowerMateTraySetup.exe
76-
asset_name: Installer
77-
asset_content_type: application/vnd.microsoft.portable-executable

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: [windows-latest]
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v1
16+
with:
17+
submodules: recursive
18+
19+
- name: Build wxWidgets Release
20+
run: |
21+
cd ${{ github.workspace }}
22+
cmd.exe /c call build_wx.bat release
23+
24+
- name: Setup MSBuild
25+
uses: microsoft/[email protected]
26+
27+
- name: Build PowerMateTray Release
28+
run: |
29+
MSBuild.exe PowerMateTray.sln -p:Configuration=Release
30+
31+
- name: Build Installer
32+
run: |
33+
cmd.exe /c call build_installer.bat
34+
35+
- name: Create Release
36+
id: create_release
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: ${{ github.ref }}
42+
release_name: ${{ github.ref }}
43+
44+
- name: Upload Release
45+
uses: actions/upload-release-asset@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
50+
asset_path: build/x64/Release/PowerMateTraySetup.exe
51+
asset_name: PowerMateTraySetup.exe
52+
asset_content_type: application/vnd.microsoft.portable-executable

0 commit comments

Comments
 (0)