Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat(release): split desktop builds by platform
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: Build Linux desktop
|
||||
|
||||
description: Build and store the Linux desktop package.
|
||||
|
||||
inputs:
|
||||
version:
|
||||
description: Package version.
|
||||
required: true
|
||||
artifact-name:
|
||||
description: GitHub Actions artifact name.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Build Linux package
|
||||
shell: bash
|
||||
run: npm run desktop:dist -- --publish never --linux --x64
|
||||
|
||||
- name: Verify Linux artifacts
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
test -f "dist/desktop/SketchForge-$VERSION-x86_64.AppImage"
|
||||
test -f dist/desktop/latest-linux.yml
|
||||
|
||||
- name: Store Linux artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: |
|
||||
dist/desktop/SketchForge-*.AppImage
|
||||
dist/desktop/latest-linux.yml
|
||||
if-no-files-found: error
|
||||
@@ -0,0 +1,77 @@
|
||||
name: Build macOS desktop
|
||||
|
||||
description: Build and store the macOS desktop package.
|
||||
|
||||
inputs:
|
||||
version:
|
||||
description: Package version.
|
||||
required: true
|
||||
artifact-name:
|
||||
description: GitHub Actions artifact name.
|
||||
required: true
|
||||
csc-link:
|
||||
description: Developer ID Application certificate.
|
||||
required: false
|
||||
csc-key-password:
|
||||
description: Developer ID Application certificate password.
|
||||
required: false
|
||||
apple-api-key:
|
||||
description: App Store Connect API private key path.
|
||||
required: false
|
||||
apple-api-key-id:
|
||||
description: App Store Connect API key ID.
|
||||
required: false
|
||||
apple-api-issuer:
|
||||
description: App Store Connect API issuer ID.
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Resolve macOS signing state
|
||||
id: signing
|
||||
shell: bash
|
||||
env:
|
||||
CSC_LINK: ${{ inputs.csc-link }}
|
||||
CSC_KEY_PASSWORD: ${{ inputs.csc-key-password }}
|
||||
APPLE_API_KEY: ${{ inputs.apple-api-key }}
|
||||
APPLE_API_KEY_ID: ${{ inputs.apple-api-key-id }}
|
||||
APPLE_API_ISSUER: ${{ inputs.apple-api-issuer }}
|
||||
run: |
|
||||
suffix=""
|
||||
if [[ -z "$CSC_LINK" || -z "$CSC_KEY_PASSWORD" || -z "$APPLE_API_KEY" || -z "$APPLE_API_KEY_ID" || -z "$APPLE_API_ISSUER" ]]; then
|
||||
suffix="-unsigned"
|
||||
fi
|
||||
echo "artifact_suffix=$suffix" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build macOS package
|
||||
shell: bash
|
||||
env:
|
||||
CSC_LINK: ${{ inputs.csc-link }}
|
||||
CSC_KEY_PASSWORD: ${{ inputs.csc-key-password }}
|
||||
APPLE_API_KEY: ${{ inputs.apple-api-key }}
|
||||
APPLE_API_KEY_ID: ${{ inputs.apple-api-key-id }}
|
||||
APPLE_API_ISSUER: ${{ inputs.apple-api-issuer }}
|
||||
run: |
|
||||
npm run desktop:dist -- --publish never --mac --universal \
|
||||
"-c.mac.artifactName=\${productName}-\${version}-\${arch}${{ steps.signing.outputs.artifact_suffix }}.\${ext}"
|
||||
|
||||
- name: Verify macOS artifacts
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
suffix="${{ steps.signing.outputs.artifact_suffix }}"
|
||||
test -f "dist/desktop/SketchForge-$VERSION-universal${suffix}.dmg"
|
||||
test -f "dist/desktop/SketchForge-$VERSION-universal${suffix}.zip"
|
||||
test -f dist/desktop/latest-mac.yml
|
||||
|
||||
- name: Store macOS artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: |
|
||||
dist/desktop/SketchForge-*-universal*.dmg
|
||||
dist/desktop/SketchForge-*-universal*.zip
|
||||
dist/desktop/latest-mac.yml
|
||||
if-no-files-found: error
|
||||
@@ -0,0 +1,44 @@
|
||||
name: Build Windows desktop
|
||||
|
||||
description: Build and store the Windows desktop package.
|
||||
|
||||
inputs:
|
||||
version:
|
||||
description: Package version.
|
||||
required: true
|
||||
artifact-name:
|
||||
description: GitHub Actions artifact name.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Build Windows package
|
||||
shell: bash
|
||||
run: npm run desktop:dist -- --publish never --win --x64
|
||||
|
||||
- name: Verify Windows artifacts
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
$required = @(
|
||||
"dist/desktop/SketchForge-Setup-$env:VERSION-x64.exe",
|
||||
"dist/desktop/SketchForge-Setup-$env:VERSION-x64.exe.blockmap",
|
||||
"dist/desktop/latest.yml"
|
||||
)
|
||||
foreach ($file in $required) {
|
||||
if (-not (Test-Path $file -PathType Leaf)) {
|
||||
throw "Missing Windows artifact: $file"
|
||||
}
|
||||
}
|
||||
|
||||
- name: Store Windows artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: |
|
||||
dist/desktop/SketchForge-Setup-*-x64.exe
|
||||
dist/desktop/SketchForge-Setup-*-x64.exe.blockmap
|
||||
dist/desktop/latest.yml
|
||||
if-no-files-found: error
|
||||
@@ -31,6 +31,9 @@ jobs:
|
||||
- platform: linux
|
||||
runner: ubuntu-latest
|
||||
artifact: desktop-linux
|
||||
- platform: macos
|
||||
runner: macos-latest
|
||||
artifact: desktop-macos
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
@@ -86,55 +89,28 @@ jobs:
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Build desktop package
|
||||
run: npm run desktop:dist -- --publish never
|
||||
|
||||
- name: Verify Windows artifacts
|
||||
if: matrix.platform == 'windows'
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.package.outputs.version }}
|
||||
run: |
|
||||
$required = @(
|
||||
"dist/desktop/SketchForge-Setup-$env:VERSION-x64.exe",
|
||||
"dist/desktop/SketchForge-Setup-$env:VERSION-x64.exe.blockmap",
|
||||
"dist/desktop/latest.yml"
|
||||
)
|
||||
foreach ($file in $required) {
|
||||
if (-not (Test-Path $file -PathType Leaf)) {
|
||||
throw "Missing Windows artifact: $file"
|
||||
}
|
||||
}
|
||||
|
||||
- name: Verify Linux artifacts
|
||||
if: matrix.platform == 'linux'
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ steps.package.outputs.version }}
|
||||
run: |
|
||||
test -f "dist/desktop/SketchForge-$VERSION-x86_64.AppImage"
|
||||
test -f dist/desktop/latest-linux.yml
|
||||
|
||||
- name: Store Windows artifacts
|
||||
if: matrix.platform == 'windows'
|
||||
uses: actions/upload-artifact@v4
|
||||
- uses: ./.github/actions/build-mac
|
||||
if: matrix.platform == 'macos'
|
||||
with:
|
||||
name: ${{ matrix.artifact }}
|
||||
path: |
|
||||
dist/desktop/SketchForge-Setup-*-x64.exe
|
||||
dist/desktop/SketchForge-Setup-*-x64.exe.blockmap
|
||||
dist/desktop/latest.yml
|
||||
if-no-files-found: error
|
||||
version: ${{ steps.package.outputs.version }}
|
||||
artifact-name: ${{ matrix.artifact }}
|
||||
csc-link: ${{ secrets.CSC_LINK }}
|
||||
csc-key-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
apple-api-key: ${{ secrets.APPLE_API_KEY }}
|
||||
apple-api-key-id: ${{ secrets.APPLE_API_KEY_ID }}
|
||||
apple-api-issuer: ${{ secrets.APPLE_API_ISSUER }}
|
||||
|
||||
- name: Store Linux artifacts
|
||||
- uses: ./.github/actions/build-linux
|
||||
if: matrix.platform == 'linux'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact }}
|
||||
path: |
|
||||
dist/desktop/SketchForge-*.AppImage
|
||||
dist/desktop/latest-linux.yml
|
||||
if-no-files-found: error
|
||||
version: ${{ steps.package.outputs.version }}
|
||||
artifact-name: ${{ matrix.artifact }}
|
||||
|
||||
- uses: ./.github/actions/build-win32
|
||||
if: matrix.platform == 'windows'
|
||||
with:
|
||||
version: ${{ steps.package.outputs.version }}
|
||||
artifact-name: ${{ matrix.artifact }}
|
||||
|
||||
attach:
|
||||
name: Attach packages to release
|
||||
@@ -207,6 +183,12 @@ jobs:
|
||||
name: desktop-linux
|
||||
path: dist/release
|
||||
|
||||
- name: Download macOS artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: desktop-macos
|
||||
path: dist/release
|
||||
|
||||
- name: Create draft release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
@@ -238,16 +220,28 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ steps.version.outputs.tag }}
|
||||
VERSION: ${{ steps.package.outputs.version }}
|
||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
|
||||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
||||
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
|
||||
run: |
|
||||
assets=$(gh release view "$TAG" --json isDraft,assets)
|
||||
test "$(jq -r '.isDraft' <<< "$assets")" = "true"
|
||||
names=$(jq -r '.assets[].name' <<< "$assets")
|
||||
suffix=""
|
||||
if [[ -z "$CSC_LINK" || -z "$CSC_KEY_PASSWORD" || -z "$APPLE_API_KEY" || -z "$APPLE_API_KEY_ID" || -z "$APPLE_API_ISSUER" ]]; then
|
||||
suffix="-unsigned"
|
||||
fi
|
||||
for expected in \
|
||||
"SketchForge-Setup-$VERSION-x64.exe" \
|
||||
"SketchForge-Setup-$VERSION-x64.exe.blockmap" \
|
||||
"latest.yml" \
|
||||
"SketchForge-$VERSION-x86_64.AppImage" \
|
||||
"latest-linux.yml"; do
|
||||
"latest-linux.yml" \
|
||||
"SketchForge-$VERSION-universal${suffix}.dmg" \
|
||||
"SketchForge-$VERSION-universal${suffix}.zip" \
|
||||
"latest-mac.yml"; do
|
||||
grep -Fxq "$expected" <<< "$names" || {
|
||||
echo "GitHub release is missing $expected" >&2
|
||||
exit 1
|
||||
|
||||
@@ -42,6 +42,7 @@ mac:
|
||||
icon: apps/web/public/assets/sketchforge/sketchforge-logo.png
|
||||
target:
|
||||
- dmg
|
||||
- zip
|
||||
category: public.app-category.graphics-design
|
||||
artifactName: ${productName}-${version}-${arch}.${ext}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user