Skip to content

Commit fe28dfb

Browse files
authored
Merge pull request #4 from JulsKawa/main
rework : support windows and linux
2 parents 73611c5 + e96a39c commit fe28dfb

File tree

4 files changed

+32
-11
lines changed

4 files changed

+32
-11
lines changed

.github/workflows/build_and_release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88

99
jobs:
10-
build-linux:
10+
build:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: write
@@ -21,11 +21,16 @@ jobs:
2121
run: |
2222
echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
2323
- name: Build Linux
24-
run: DOCKER_BUILDKIT=1 docker build . -f Dockerfile --output build
24+
run: DOCKER_BUILDKIT=1 docker build . -f dockerfiles/linux.dockerfile --output build
25+
- name: Build Windows
26+
run: DOCKER_BUILDKIT=1 docker build . -f dockerfiles/win.dockerfile --output build
2527
- name: Release
2628
uses: softprops/action-gh-release@v2.2.1
2729
with:
2830
tag_name: ${{ env.VERSION }}
2931
generate_release_notes: true
3032
files: |
31-
./build/wartlock.AppImage
33+
./build/wartlock.AppImage
34+
./build/wartlock.exe
35+
./build/win-portable.zip
36+
./build/linux-portable.zip

Dockerfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

dockerfiles/linux.dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:lts-bookworm AS linux_build
2+
COPY . /code
3+
WORKDIR /code
4+
RUN npm i
5+
RUN npm run build:linux
6+
7+
RUN apt-get update && apt-get install -y zip && \
8+
zip -r /code/dist/linux-unpacked.zip /code/dist/linux-unpacked
9+
10+
FROM scratch AS export-stage
11+
COPY --from=linux_build /code/dist/*.AppImage /wartlock.AppImage
12+
COPY --from=linux_build /code/dist/linux-unpacked.zip ./linux-portable.zip

dockerfiles/win.dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM electronuserland/builder:wine AS build
2+
COPY . /code
3+
WORKDIR /code
4+
RUN npm i
5+
RUN npm run build:win
6+
7+
RUN apt-get update && apt-get install -y zip && \
8+
zip -r /code/dist/win-unpacked.zip /code/dist/win-unpacked
9+
10+
FROM scratch AS export-stage
11+
COPY --from=build /code/dist/*.exe ./wartlock.exe
12+
COPY --from=build /code/dist/win-unpacked.zip ./win-portable.zip

0 commit comments

Comments
 (0)