Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit c4e6610

Browse files
authored
Update release.yml
1 parent f24800a commit c4e6610

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
build:
1010

1111
runs-on: windows-latest
12+
env:
13+
build-dir: ./bin/Release
1214

1315
steps:
1416
- name: Checkout
@@ -38,10 +40,18 @@ jobs:
3840
- name: Build Project
3941
run: msbuild /p:Configuration=Release
4042

41-
# Zip Relase
42-
- name: Compress files # This would actually build your project, using zip for an example artifact
43-
run: zip --junk-paths "SPEdit-${GITHUB_REF##*/}" bin/Release/*
44-
43+
# Build Installer
44+
- name: Build Installer (NSIS)
45+
uses: joncloud/makensis-action@v1
46+
with:
47+
script-file: .\bin\Release\SPEdit.nsi
48+
include-more-plugins: true
49+
50+
# Compress Portable Version
51+
- name: Compress Portable Version
52+
run: .\bin\Release\Compress.ps1
53+
shell: powershell
54+
4555
- name: Create Release
4656
id: create_release
4757
uses: actions/create-release@v1
@@ -53,13 +63,25 @@ jobs:
5363
draft: false
5464
prerelease: false
5565

56-
- name: Upload Release Asset
57-
id: upload-release-asset
66+
67+
- name: Upload Installer
68+
id: upload-installer
69+
uses: actions/upload-release-asset@v1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
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
74+
asset_path: .\bin\Rlease\SPEdit.Installer.exe
75+
asset_name: SPEdit.Installer.exe
76+
asset_content_type: application/octet-stream
77+
78+
- name: Upload Portable
79+
id: upload-portable
5880
uses: actions/upload-release-asset@v1
5981
env:
6082
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6183
with:
6284
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
63-
asset_path: ./SPEdit-${GITHUB_REF##*/}.zip
64-
asset_name: SPEdit-${GITHUB_REF##*/}.zip
85+
asset_path: .\bin\Rlease\SPEdit.Portable.zip
86+
asset_name: SPEdit.Portable.zip
6587
asset_content_type: application/zip

0 commit comments

Comments
 (0)