mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
173 lines
No EOL
4.7 KiB
YAML
173 lines
No EOL
4.7 KiB
YAML
name: Create Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
NODE_VERSION: 20.11.0
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CSC_LINK: ${{ secrets.MAC_CERT_P12_BASE64 }}
|
|
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_P12_PASSWORD }}
|
|
WIN_CSC_LINK: ${{ secrets.WIN_CERT_P12_BASE64 }}
|
|
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_P12_PASSWORD }}
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
|
|
jobs:
|
|
build-ubuntu:
|
|
name: Build Ubuntu
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
uses: ./.github/actions/build
|
|
env:
|
|
NODE_VERSION: ${{ env.NODE_VERSION }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
matrix-os: ubuntu-latest
|
|
matrix-name: ubuntu
|
|
upload-artifact: true
|
|
|
|
build-macos:
|
|
name: Build macOS
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
uses: ./.github/actions/build
|
|
env:
|
|
NODE_VERSION: ${{ env.NODE_VERSION }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
matrix-os: macos-latest
|
|
matrix-name: macos
|
|
upload-artifact: true
|
|
|
|
build-windows:
|
|
name: Build Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
uses: ./.github/actions/build
|
|
env:
|
|
NODE_VERSION: ${{ env.NODE_VERSION }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
matrix-os: windows-latest
|
|
matrix-name: win
|
|
upload-artifact: true
|
|
|
|
# ARM Linux:
|
|
|
|
build-linux-armv7l:
|
|
name: Build Linux ARMv7l
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build ARMv7l
|
|
uses: ./.github/actions/build-linux-arm
|
|
env:
|
|
NODE_VERSION: ${{ env.NODE_VERSION }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
matrix-name: armv7l
|
|
matrix-cpu: cortex-a8
|
|
matrix-image: raspios_lite:latest
|
|
upload-artifact: true
|
|
|
|
build-linux-arm64:
|
|
name: Build Linux ARM64
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build ARM64
|
|
uses: ./.github/actions/build-linux-arm
|
|
env:
|
|
NODE_VERSION: ${{ env.NODE_VERSION }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
matrix-name: arm64
|
|
matrix-cpu: cortex-a53
|
|
matrix-image: raspios_lite_arm64:latest
|
|
upload-artifact: true
|
|
|
|
###
|
|
|
|
upload-release:
|
|
name: Upload and Create Release
|
|
needs:
|
|
- build-ubuntu
|
|
- build-macos
|
|
- build-windows
|
|
- build-linux-armv7l
|
|
- build-linux-arm64
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: ./artifacts
|
|
|
|
- name: List downloaded artifacts
|
|
run: ls -R ./artifacts
|
|
|
|
- name: Ensure non-empty artifacts
|
|
run: |
|
|
echo "Checking for zero-byte files in artifacts/..."
|
|
find artifacts/ -type f -empty -print -delete
|
|
echo "Cleaned up any zero-byte files."
|
|
echo "Remaining files:"
|
|
ls -R artifacts/
|
|
|
|
- name: Dump release assets for debugging
|
|
if: always()
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub CLI needs this
|
|
run: |
|
|
echo "Fetching release assets for tag: ${{ github.ref_name }}"
|
|
gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" --json assets --jq '.assets[] | "\(.name) - \(.url)"' || true
|
|
|
|
- name: Create GitHub Release
|
|
# Pinned to work around https://github.com/softprops/action-gh-release/issues/445
|
|
uses: softprops/action-gh-release@v2.0.5
|
|
env:
|
|
NODE_VERSION: ${{ env.NODE_VERSION }}
|
|
ACTIONS_STEP_DEBUG: true
|
|
with:
|
|
preserve_order: true
|
|
overwrite: true
|
|
name: Release ${{ github.ref_name }}
|
|
tag_name: ${{ github.ref }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
draft: true
|
|
files: |
|
|
artifacts/**/*.dmg
|
|
artifacts/**/*.snap
|
|
artifacts/**/*.AppImage
|
|
artifacts/**/*.deb
|
|
artifacts/**/*.pacman
|
|
artifacts/**/*.exe |