Skip to content

Commit

Permalink
Use separate Win/Linux/MacOS build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Varg committed Oct 31, 2024
1 parent 6313064 commit 6a5539e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/release_on_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ name: Release on tag
run-name: Release on tag ${{ github.ref_name }}

jobs:
build:
name: Build and upload ${{ github.ref_name }}
build_win:
name: Build and upload ${{ github.ref_name }} (Windows)
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -22,15 +22,37 @@ jobs:
echo 'EOF'
} >> "${GITHUB_OUTPUT}"
- name: Build release
run: ./build_release.sh "${{ github.ref_name }}"
run: ./build_release_windows.sh "${{ github.ref_name }}"
- name: Publish release
uses: softprops/action-gh-release@v2
with:
make_latest: true
body: ${{ steps.tag-data.outputs.annotation }}
files: dist/*
build_linux:
name: Build and upload ${{ github.ref_name }} (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get annotation
id: tag-data
run: |
{
echo 'annotation <<EOF'
git for-each-ref "${GITHUB_REF}" --format '%(contents)'
echo 'EOF'
} >> "${GITHUB_OUTPUT}"
- name: Build release
run: ./build_release_linux.sh "${{ github.ref_name }}"
- name: Publish release
uses: softprops/action-gh-release@v2
with:
make_latest: true
body: ${{ steps.tag-data.outputs.annotation }}
files: dist/*
build_macos:
name: Build and upload on MacOS ${{ github.ref_name }}
name: Build and upload ${{ github.ref_name }} (MacOS)
runs-on: macos-latest
steps:
- name: Checkout code
Expand All @@ -43,7 +65,7 @@ jobs:
git for-each-ref "${GITHUB_REF}" --format '%(contents)'
echo 'EOF'
} >> "${GITHUB_OUTPUT}"
- name: Build MacOS release
- name: Build release
run: ./build_release_macos.sh "${{ github.ref_name }}"
- name: Publish release
uses: softprops/action-gh-release@v2
Expand Down
3 changes: 0 additions & 3 deletions build_release.sh → build_release_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ export RELEASE_VER="${1:-0.0.0}"

mkdir -p dist

echo "Preparing Win32 release $RELEASE_VER"
./build_packages/pack_win32.sh

echo "Preparing Linux64 release $RELEASE_VER"
./build_packages/pack_linux64.sh

Expand Down
8 changes: 8 additions & 0 deletions build_release_windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

export RELEASE_VER="${1:-0.0.0}"

mkdir -p dist

echo "Preparing Win32 release $RELEASE_VER"
./build_packages/pack_win32.sh

0 comments on commit 6a5539e

Please sign in to comment.