Skip to content

Merge pull request #93 from kounkou/post-to-social-media #79

Merge pull request #93 from kounkou/post-to-social-media

Merge pull request #93 from kounkou/post-to-social-media #79

Workflow file for this run

name: Build and Release Application
on:
push:
branches:
- main # Change to your default branch
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Qt5
run: |
sudo apt-get update
sudo apt install -y qtbase5-dev qt5-qmake qtwebengine5-dev
- name: Set architecture for build
run: echo "Building for x64 architecture"
- name: Build application
run: |
chmod +x ./build.sh # Make sure your build script is executable
./build.sh ubuntu-latest-x64-binary
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: Hedgehog-ubuntu-latest-x64-binary
path: Hedgehog-ubuntu-latest-x64-binary
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Qt5 on macOS
run: |
brew install qt@5
brew link --force qt@5 --overwrite
- name: Set architecture for build
run: echo "Building for arm64 architecture"
- name: Build application
run: |
chmod +x ./build.sh # Make sure your build script is executable
./build.sh macos-latest-arm64-binary
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: Hedgehog-macos-latest-arm64-binary
path: Hedgehog-macos-latest-arm64-binary
release:
runs-on: ubuntu-latest
needs: [build-linux, build-macos]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Linux x64 binary
uses: actions/download-artifact@v3
with:
name: Hedgehog-ubuntu-latest-x64-binary
path: ./
- name: Download macOS arm64 binary
uses: actions/download-artifact@v3
with:
name: Hedgehog-macos-latest-arm64-binary
path: ./
- name: Create Draft Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: v1.0.0
name: "Release v1.0.0"
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifacts to Release
run: gh release upload v1.0.0 ./Hedgehog-* --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}