Skip to content

Commit f1bcea0

Browse files
Merge pull request #24 from ManasMalla/master
2 parents 359d223 + 4da9d66 commit f1bcea0

File tree

5 files changed

+75
-8
lines changed

5 files changed

+75
-8
lines changed

.github/workflows/main.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build Executable
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
workflow_dispatch:
9+
10+
# Necessary permissions to create releases and tags
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build:
16+
runs-on: windows-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18'
26+
cache: 'npm'
27+
28+
# 1. Extract version from package.json and save to Env Var
29+
- name: Get Version from package.json
30+
shell: bash
31+
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Build executable
37+
run: npm run dist
38+
39+
# 2. Rename the output file using the extracted version
40+
# Assumes builder outputs: "dist/flutter_installer 1.2.0.exe"
41+
# Renames to: "dist/flutter_installer.1.2.0.exe"
42+
- name: Rename executable
43+
shell: bash
44+
run: |
45+
mv "dist/flutter_installer $VERSION.exe" "dist/flutter_installer.$VERSION.exe"
46+
47+
# Optional: Still upload as artifact if you want to download it from the Actions tab
48+
- name: Upload executable artifact
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: flutter-installer-${{ env.VERSION }}
52+
path: dist/flutter_installer.${{ env.VERSION }}.exe
53+
retention-days: 30
54+
55+
# 3. Create Release and Tag
56+
- name: Create Release
57+
# Only create release on push to main/master (skip on PRs)
58+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
59+
uses: softprops/action-gh-release@v2
60+
with:
61+
tag_name: v${{ env.VERSION }}
62+
name: flutter_installer.${{ env.VERSION }}
63+
files: dist/flutter_installer.${{ env.VERSION }}.exe
64+
draft: false
65+
prerelease: false
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

app/download/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h5>These components will be downloaded:</h5>
3333
<p id="cmd-name" style="font-style: italic;">version: </p>
3434
</li>
3535
<li>
36-
<strong>Open JDK 8</strong> &nbsp; &nbsp;
36+
<strong>Open JDK 25</strong> &nbsp; &nbsp;
3737
<div id="jdk-loader" class="loader"></div>
3838
<i id="jdk-done" class="material-icons completion-icon">done</i>
3939
<p id="jdk-name" style="font-style: italic;">version: </p>
@@ -59,4 +59,4 @@ <h5>These components will be downloaded:</h5>
5959

6060
</body>
6161

62-
</html>
62+
</html>

app/install/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h5>Extracting components:</h5>
3232
<i id="cmd-done" class="material-icons completion-icon">done</i>
3333
</li>
3434
<li>
35-
<strong>Open JDK 8</strong> &nbsp; &nbsp;
35+
<strong>Open JDK 25</strong> &nbsp; &nbsp;
3636
<div id="jdk-loader" class="loader"></div>
3737
<i id="jdk-done" class="material-icons completion-icon">done</i>
3838
</li>
@@ -65,4 +65,4 @@ <h5>Extracting components:</h5>
6565

6666
</body>
6767

68-
</html>
68+
</html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flutter_installer",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "An installation toolkit for the flutter framework",
55
"main": "main.js",
66
"scripts": {

urls.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"command-line-tools": "https://dl.google.com/android/repository/commandlinetools-win-6200805_latest.zip",
3-
"jdk": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09.1/OpenJDK8U-jdk_x86-32_windows_hotspot_8u252b09.zip"
4-
}
2+
"command-line-tools": "https://dl.google.com/android/repository/commandlinetools-win-13114758_latest.zip",
3+
"jdk": "https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.1%2B8/OpenJDK25U-jdk_x64_windows_hotspot_25.0.1_8.zip"
4+
}

0 commit comments

Comments
 (0)