Skip to content

Commit

Permalink
Add draft release steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Cofeiini committed May 1, 2024
1 parent 135df51 commit 6b36b69
Showing 1 changed file with 48 additions and 56 deletions.
104 changes: 48 additions & 56 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ env:
OPENSSL_VERSION: '3.0'

jobs:
# create_release:
# name: "🗃️ Prepare a draft release"
# permissions:
# contents: write
# runs-on: ubuntu-latest
# outputs:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# release_id: ${{ steps.create_release.outputs.id }}
# steps:
# - uses: actions/checkout@v4
# - name: "🗃️ Create draft release"
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# draft: true
create_release:
name: "🗃️ Prepare a draft release"
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
release_id: ${{ steps.create_release.outputs.id }}
steps:
- uses: actions/checkout@v4
- name: "🗃️ Create draft release"
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
draft: true
build_linux:
# needs: create_release
needs: create_release
runs-on: ubuntu-latest
name: "🐧 Build Linux AppImage"
steps:
Expand All @@ -45,14 +45,6 @@ jobs:
version: ${{ env.QT_INSTALL }}
archives: "qtbase icu"
cache: true
# - name: "⚙️ Build Qt ${{ env.QT_VERSION }}"
# working-directory: ${{ runner.temp }}
# run: |
# git clone --depth=1 --branch=${{ env.QT_VERSION }} https://github.com/qt/qtbase.git
# cd qtbase
# ./configure -release -openssl -no-pch -ltcg -qt-pcre -qt-zlib -qt-freetype -qt-harfbuzz -qt-libpng -qt-libjpeg -xcb -c++std c++2b -nomake examples -nomake tests -prefix ${{ runner.temp }}/qt-shared -disable-deprecated-up-to 0x060700
# cmake --build . --parallel
# cmake --install .
- name: "🛠️ Compile application"
run: |
qt-cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
Expand All @@ -69,17 +61,17 @@ jobs:
with:
name: "${{ env.APP_NAME }}-x86_64.AppImage"
path: "${{ env.APP_NAME }}-x86_64.AppImage"
# - name: "📤 Release AppImage"
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: "${{ env.APP_NAME }}-x86_64.AppImage"
# asset_name: "${{ env.APP_NAME }}-x86_64.AppImage"
# asset_content_type: application/vnd.appimage
- name: "📤 Release AppImage"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: "${{ env.APP_NAME }}-x86_64.AppImage"
asset_path: "${{ env.APP_NAME }}-x86_64.AppImage"
asset_content_type: application/vnd.appimage
build_windows:
# needs: create_release
needs: create_release
runs-on: windows-latest
name: "🪟 Build Windows Executable"
steps:
Expand Down Expand Up @@ -128,17 +120,17 @@ jobs:
with:
name: "${{ env.APP_NAME }}.exe"
path: "build/${{ env.APP_NAME }}.exe"
# - name: "📤 Release Executable"
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: "build/${{ env.APP_NAME }}.exe"
# asset_name: "${{ env.APP_NAME }}.exe"
# asset_content_type: application/vnd.microsoft.portable-executable
- name: "📤 Release Executable"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: "${{ env.APP_NAME }}.exe"
asset_path: "build/${{ env.APP_NAME }}.exe"
asset_content_type: application/vnd.microsoft.portable-executable
build-macos:
# needs: create_release
needs: create_release
runs-on: macos-latest
name: "🍎 Build macOS DMG"
steps:
Expand All @@ -160,12 +152,12 @@ jobs:
with:
name: "${{ env.APP_NAME }}.dmg"
path: "build/${{ env.APP_NAME }}.dmg"
# - name: "📤 Release DMG"
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: build/${{ env.APP_NAME }}.dmg
# asset_name: ${{ env.APP_NAME }}.dmg
# asset_content_type: application/x-apple-diskimage
- name: "📤 Release DMG"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: "${{ env.APP_NAME }}.dmg"
asset_path: "build/${{ env.APP_NAME }}.dmg"
asset_content_type: application/x-apple-diskimage

0 comments on commit 6b36b69

Please sign in to comment.