This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (58 loc) · 2.34 KB
/
build-installer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build Installer
on:
workflow_dispatch:
jobs:
build:
permissions: write-all
name: Build Installer
runs-on: windows-latest # Run script on windows system
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # Use NodeJs 20
- name: Install Dependencies
run: npm install # Install dependecies in package.json
- name: Compile and Build Installer
run: npm run build # Run the build script in package.json
- name: Calculate Artifact Hash
id: calculate-hash
run: |
echo "::set-output name=hash::$(sha256sum build/output/Millennium.Installer-Windows.exe | cut -d ' ' -f 1)"
- name: Create Checksum File
run: |
echo "${{ steps.calculate-hash.outputs.hash }}" > checksum.sha256
working-directory: build/output/
- name: Create Release Draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 1.0.0 # You can specify your version here
release_name: Millennium.Installer v1.0.0 # You can specify your release name here
draft: true
prerelease: false # Change to true if it's a pre-release
body: |
This is a draft release for the Millennium Installer.
Please review and provide feedback.
- name: Upload Installer Executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/output/Millennium.Installer-Windows.exe
asset_name: Millennium.Installer-Windows.exe
asset_content_type: application/octet-stream
- name: Upload Checksum File
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/output/checksum.sha256
asset_name: checksum.sha256
asset_content_type: text/plain