Skip to content

Commit b5da70e

Browse files
author
Максим Лясковский
committed
ci: add macOS test and release workflows
1 parent 6b93bb1 commit b5da70e

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
runs-on: macos-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python 3.11
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.11'
23+
24+
- name: Create venv and install dependencies
25+
run: |
26+
python3.11 -m venv venv
27+
venv/bin/pip install --upgrade pip
28+
venv/bin/pip install -r requirements.txt -r requirements-dev.txt
29+
30+
- name: Run tests (sanity check before building)
31+
run: venv/bin/pytest -v
32+
33+
- name: Build LinkBridge.app
34+
run: ./scripts/build_app.sh
35+
36+
- name: Package .app as a zip with ditto
37+
run: |
38+
cd dist
39+
ditto -c -k --keepParent LinkBridge.app "LinkBridge-${{ github.ref_name }}.zip"
40+
ls -la
41+
42+
- name: Create draft GitHub Release
43+
env:
44+
GH_TOKEN: ${{ github.token }}
45+
run: |
46+
gh release create "${{ github.ref_name }}" \
47+
--repo "${{ github.repository }}" \
48+
--title "LinkBridge ${{ github.ref_name }}" \
49+
--notes "Automated build of ${{ github.ref_name }}.
50+
51+
The bundled \`.app\` is unsigned. On first launch macOS Gatekeeper will block it — right-click \`LinkBridge.app\` in Finder → **Open** → confirm the warning, then launch normally afterwards.
52+
53+
See the README for usage and the Rekordbox workflow notes." \
54+
--draft \
55+
"dist/LinkBridge-${{ github.ref_name }}.zip"

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: macos-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Create venv and install dependencies
22+
run: |
23+
python3.11 -m venv venv
24+
venv/bin/pip install --upgrade pip
25+
venv/bin/pip install -r requirements.txt -r requirements-dev.txt
26+
27+
- name: Run pytest
28+
run: venv/bin/pytest -v

0 commit comments

Comments
 (0)