Skip to content

Commit

Permalink
Merge pull request #1 from dshatz/release/1.0.0
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
dshatz authored Jan 2, 2024
2 parents 292440e + 13a69ec commit 0586a65
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Python application

on:
push:
branches: [ "master" ]
branches:
- release/*
pull_request:
branches: [ "master" ]

permissions:
contents: write
Expand All @@ -17,6 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: winterjung/split@v2
id: split
with:
msg: ${{ github.ref_name }}
separator: '/'
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
Expand All @@ -31,12 +36,17 @@ jobs:
run: pyinstaller adbgateway.spec
- uses: actions/upload-artifact@v3
with:
name: linux-${{ github.sha }}
name: linux-${{ steps.split.outputs._1 }}
path: dist/adbgateway
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: winterjung/split@v2
id: split
with:
msg: ${{ github.ref_name }}
separator: '/'
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
Expand All @@ -48,15 +58,22 @@ jobs:
pip install -r adbgateway/requirements.txt
pip install pyinstaller
- name: Build
env:
EXE_VERSION: ${{ steps.split.outputs._1 }}
run: pyinstaller adbgateway.spec
- uses: actions/upload-artifact@v3
with:
name: windows-${{ github.sha }}.exe
name: windows-${{ steps.split.outputs._1 }}.exe
path: dist/adbgateway.exe
release:
runs-on: ubuntu-latest
needs: [build-linux, build-windows]
steps:
- uses: winterjung/split@v2
id: split
with:
msg: ${{ github.ref_name }}
separator: '/'
- uses: actions/download-artifact@v3
with:
path: artifacts
Expand All @@ -65,9 +82,9 @@ jobs:
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
tag_name: release-${{ github.sha }}
name: ${{ github.sha }}
tag_name: ${{ steps.split.outputs._1 }}
name: ${{ steps.split.outputs._1 }}
files: |
linux-${{ github.sha }}
windows-${{ github.sha }}.exe
artifacts/linux-${{ steps.split.outputs._1 }}
artifacts/windows-${{ steps.split.outputs._1 }}.exe
3 changes: 2 additions & 1 deletion adbgateway.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- mode: python ; coding: utf-8 -*-

import os

a = Analysis(
['adbgateway/adbgateway.py'],
Expand All @@ -26,6 +26,7 @@ exe = EXE(
bootloader_ignore_signals=False,
strip=False,
upx=True,
version=os.environ['EXE_VERSION'],
upx_exclude=[],
runtime_tmpdir=None,
console=True,
Expand Down

0 comments on commit 0586a65

Please sign in to comment.