-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (65 loc) · 2.18 KB
/
build.yml
File metadata and controls
83 lines (65 loc) · 2.18 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: FlowRunner Build
on:
push:
branches: [ "main", "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build application
run: npm run dist -- --publish never
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-build
path: dist/
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Get version from package.json
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Prepare release assets
run: |
mkdir -p release
VERSION="${{ steps.version.outputs.version }}"
# macOS - extract DMG and rename
cp artifacts/macos-latest-build/FlowRunner-${VERSION}-arm64.dmg \
release/FlowRunnerSetup-arm64-mac-${VERSION}.dmg
# Windows - zip the portable app directory
cd artifacts/windows-latest-build/win-unpacked
zip -r ../../../release/FlowRunnerSetup-x64-win-${VERSION}.zip .
cd ../../..
# Linux - extract AppImage and rename
cp artifacts/ubuntu-latest-build/FlowRunner-${VERSION}.AppImage \
release/FlowRunnerSetup-x64-linux-${VERSION}.AppImage
ls -lh release/
- name: Create or update GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: FlowRunner v${{ steps.version.outputs.version }}
body_path: release.md
files: release/*
make_latest: true