mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
add version input to build workflows and update deployment scripts
This commit is contained in:
@@ -2,6 +2,18 @@ name: Build Linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Build version (e.g., v1.2.3)"
|
||||
required: true
|
||||
default: "dev"
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: "Build version (e.g., v1.2.3)"
|
||||
required: true
|
||||
type: string
|
||||
default: "dev"
|
||||
env:
|
||||
QT_VERSION: "6.7.2"
|
||||
GO_VERSION: "1.23.0"
|
||||
@@ -150,10 +162,10 @@ jobs:
|
||||
|
||||
- name: Build AppImage
|
||||
run: |
|
||||
export VERSION=1.0.0
|
||||
export VERSION=${{ inputs.version }}
|
||||
# linuxdeployqt tries to bundle SQL drivers which we don't need
|
||||
rm -rf ${{ github.workspace }}/Qt/{${{ env.QT_VERSION }}/gcc_64/plugins/sqldrivers/**
|
||||
./scripts/deploy-appimage.sh $VERSION
|
||||
./scripts/deploy-appimage.sh ${{ inputs.version }}
|
||||
|
||||
- name: Upload Artifact (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
|
||||
@@ -2,6 +2,18 @@ name: Build macOS
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Build version (e.g., v1.2.3)"
|
||||
required: true
|
||||
default: "dev"
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: "Build version (e.g., v1.2.3)"
|
||||
required: true
|
||||
type: string
|
||||
default: "dev"
|
||||
env:
|
||||
QT_VERSION: "6.7.2"
|
||||
GO_VERSION: "1.23.0"
|
||||
@@ -19,8 +31,8 @@ jobs:
|
||||
include:
|
||||
- runner: macos-15-intel
|
||||
arch: x86_64
|
||||
# - runner: macos-14
|
||||
# arch: arm64
|
||||
- runner: macos-14
|
||||
arch: arm64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
steps:
|
||||
@@ -140,7 +152,7 @@ jobs:
|
||||
run: cmake --build build --config Release
|
||||
|
||||
- name: Deploy and create DMG
|
||||
run: ./deploy-dmg.sh ${{ matrix.arch }}
|
||||
run: ./scripts/deploy-dmg.sh ${{ matrix.arch }} ${{ inputs.version }}
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -2,6 +2,18 @@ name: Build Windows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Build version (e.g., v1.2.3)"
|
||||
required: true
|
||||
default: "dev"
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: "Build version (e.g., v1.2.3)"
|
||||
required: true
|
||||
type: string
|
||||
default: "dev"
|
||||
env:
|
||||
QT_VERSION: "6.8.0"
|
||||
GO_VERSION: "1.23.0"
|
||||
|
||||
@@ -1,21 +1,47 @@
|
||||
name: Build iDescriptor
|
||||
name: Build & Release iDescriptor
|
||||
|
||||
on:
|
||||
# push:
|
||||
# branches: ["main"]
|
||||
# pull_request:
|
||||
# branches: ["main"]
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
secrets: inherit
|
||||
|
||||
build-windows:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
secrets: inherit
|
||||
|
||||
build-macos:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
secrets: inherit
|
||||
|
||||
release:
|
||||
needs: [build-linux, build-windows, build-macos]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Prepare output folder
|
||||
run: mkdir target
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: target
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: target/*
|
||||
tag: ${{ github.ref }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user