-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (53 loc) · 1.69 KB
/
cd.yaml
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
name: CD
on:
push:
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
# NOTE: https://github.com/actions/python-versions#building-installation-packages
# For Python >= 3.11, the official macOS universal2 Python binaries are simply downloaded from python.org and...
python-version: ["3.12"]
poetry-version: ["2.0.1"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Config
run: poetry config virtualenvs.create false --local
- name: Install deps
run: poetry install
- name: Set version
run: echo "APP_VERSION=$(poetry version --short)" >> $GITHUB_ENV
- name: Install JS deps
run: pnpm install
- name: Build
run: make build
- name: Package app
run: |
mkdir build/volume
cp -R 'build/dist/Tiny Wi-Fi Analyzer.app' build/volume
hdiutil create \
-fs HFS+ \
-srcfolder "build/volume" \
-volname "Tiny Wi-Fi Analyzer" "build/Tiny_Wi-Fi_Analyzer.dmg"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
name: Release v${{ env.APP_VERSION }}
files: build/Tiny_Wi-Fi_Analyzer.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}