Skip to content

Commit f819227

Browse files
committed
build release action for more architectures
1 parent c84bd6e commit f819227

2 files changed

Lines changed: 173 additions & 77 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches: master
6+
tags: [ 'v*' ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
include:
15+
- os: ubuntu-latest
16+
binary_name: exportify-cli-linux-x64
17+
- os: windows-latest
18+
binary_name: exportify-cli-windows-x64.exe
19+
- os: ubuntu-24.04-arm
20+
binary_name: exportify-cli-linux-arm64
21+
- os: windows-11-arm
22+
binary_name: exportify-cli-windows-arm64.exe
23+
- os: macos-15-intel
24+
binary_name: exportify-cli-macos-intel
25+
- os: macos-latest
26+
binary_name: exportify-cli-macos-arm64
27+
28+
steps:
29+
- uses: actions/checkout@v5
30+
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v7
33+
with:
34+
version: 'latest'
35+
36+
- name: Set up Python
37+
run: uv python install 3.11
38+
39+
- name: Sync dependencies
40+
run: uv sync
41+
42+
- name: Build executable
43+
run: uvx pyinstaller --onefile --name ${{ matrix.binary_name }} exportify-cli.py
44+
45+
- name: Upload artifact
46+
uses: actions/upload-artifact@v5
47+
with:
48+
name: ${{ matrix.binary_name }}
49+
path: dist/${{ matrix.binary_name }}
50+
51+
release:
52+
needs: build
53+
runs-on: ubuntu-latest
54+
if: startsWith(github.ref, 'refs/tags/v')
55+
56+
steps:
57+
- name: Download all artifacts
58+
uses: actions/download-artifact@v6
59+
60+
- name: Create Release
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
files: |
64+
exportify-cli-linux-x64/exportify-cli-linux-x64
65+
exportify-cli-linux-arm64/exportify-cli-linux-arm64
66+
exportify-cli-windows-x64.exe/exportify-cli-windows-x64.exe
67+
exportify-cli-windows-arm64.exe/exportify-cli-windows-arm64.exe
68+
exportify-cli-macos-intel/exportify-cli-macos-intel
69+
exportify-cli-macos-arm64/exportify-cli-macos-arm64
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)