Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniels Satcs committed Jan 2, 2024
1 parent 13a69ec commit fe1a857
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@ permissions:
contents: write

jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: winterjung/split@v2
id: split
with:
msg: ${{ github.ref_name }}
separator: '/'
- name: Save version to file
run: echo ${{ steps.split.outputs._1 }} > version.txt
- uses: actions/upload-artifact@v3
with:
name: version.txt
path: version.txt
build-linux:
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 @@ -39,14 +48,20 @@ jobs:
name: linux-${{ steps.split.outputs._1 }}
path: dist/adbgateway
build-windows:
needs: get-version
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: winterjung/split@v2
id: split
with:
msg: ${{ github.ref_name }}
separator: '/'
- uses: actions/download-artifact@v3
with:
merge-multiple: true
path: version
- name: Load version from file
id: version
shell: bash
run: |
content=`cat version/version.txt`
echo "::set-output name=version::$content"
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
Expand All @@ -59,7 +74,7 @@ jobs:
pip install pyinstaller
- name: Build
env:
EXE_VERSION: ${{ steps.split.outputs._1 }}
EXE_VERSION: ${{ steps.version.outputs.version }}
run: pyinstaller adbgateway.spec
- uses: actions/upload-artifact@v3
with:
Expand All @@ -69,11 +84,6 @@ jobs:
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 Down

0 comments on commit fe1a857

Please sign in to comment.