-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (82 loc) · 2.82 KB
/
Copy pathrelease.yml
File metadata and controls
101 lines (82 loc) · 2.82 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
windows-zip:
name: Build Windows release zip
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run checks
run: npm run check
- name: Prepare release metadata
id: meta
shell: bash
run: |
VERSION="$(node -p "require('./package.json').version")"
SHORT_SHA="${GITHUB_SHA::7}"
BUILT_AT="$(date -u +'%Y-%m-%d %H:%M UTC')"
TAG="windows-${GITHUB_RUN_NUMBER}"
ASSET_NAME="flect-windows.zip"
{
echo "version=${VERSION}"
echo "tag=${TAG}"
echo "asset_name=${ASSET_NAME}"
echo "built_at=${BUILT_AT}"
echo "short_sha=${SHORT_SHA}"
echo "title=Flect for Windows - Build ${GITHUB_RUN_NUMBER}"
} >> "$GITHUB_OUTPUT"
- name: Create Windows zip
shell: bash
run: |
mkdir -p dist
git archive \
--format=zip \
--prefix="flect-windows/" \
--output="dist/${{ steps.meta.outputs.asset_name }}" \
HEAD
ls -lh "dist/${{ steps.meta.outputs.asset_name }}"
- name: Write release notes
shell: bash
run: |
cat > release-notes.md <<'EOF'
## Download Flect for Windows
Download `flect-windows.zip` from the assets below, extract it, then double-click `run.bat`.
This Windows package includes the Flect web dashboard, the one-click launcher, and bundled `scrcpy`/`adb` binaries. Node.js 18+ is still required; the launcher installs npm dependencies automatically on first run.
## Requirements
- Windows 10/11
- Node.js 18 or newer
- Android 11+ with Wireless debugging enabled
## Build
- Version: `${{ steps.meta.outputs.version }}`
- Source branch: `${{ github.ref_name }}`
- Source commit: `${{ steps.meta.outputs.short_sha }}`
- Built: `${{ steps.meta.outputs.built_at }}`
EOF
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ steps.meta.outputs.tag }}" \
"dist/${{ steps.meta.outputs.asset_name }}#Flect Windows ZIP" \
--target "${{ github.sha }}" \
--title "${{ steps.meta.outputs.title }}" \
--notes-file release-notes.md \
--latest