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
89 lines
3.0 KiB
YAML
89 lines
3.0 KiB
YAML
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
|
|
arch:
|
|
description: macOS architecture.
|
|
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=""
|
|
signing_enabled=true
|
|
if [[ -z "$CSC_LINK" || -z "$CSC_KEY_PASSWORD" || -z "$APPLE_API_KEY" || -z "$APPLE_API_KEY_ID" || -z "$APPLE_API_ISSUER" ]]; then
|
|
suffix="-unsigned"
|
|
signing_enabled=false
|
|
fi
|
|
echo "artifact_suffix=$suffix" >> "$GITHUB_OUTPUT"
|
|
echo "signing_enabled=$signing_enabled" >> "$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 }}
|
|
CSC_IDENTITY_AUTO_DISCOVERY: ${{ steps.signing.outputs.signing_enabled }}
|
|
run: |
|
|
npm run desktop:dist -- --publish never --mac --${{ inputs.arch }} \
|
|
"-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-${{ inputs.arch }}${suffix}.dmg"
|
|
test -f "dist/desktop/SketchForge-$VERSION-${{ inputs.arch }}${suffix}.zip"
|
|
test -f dist/desktop/latest-mac.yml
|
|
|
|
- name: Rename macOS update manifest
|
|
shell: bash
|
|
run: mv dist/desktop/latest-mac.yml "dist/desktop/latest-mac-${{ inputs.arch }}.yml"
|
|
|
|
- name: Store macOS artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ inputs.artifact-name }}
|
|
path: |
|
|
dist/desktop/SketchForge-*-${{ inputs.arch }}*.dmg
|
|
dist/desktop/SketchForge-*-${{ inputs.arch }}*.zip
|
|
dist/desktop/latest-mac-${{ inputs.arch }}.yml
|
|
if-no-files-found: error
|