-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.56 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
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.11]
poetry-version: [1.5.1]
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
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: 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 }}