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
fix(release): harden macOS publishing
This commit is contained in:
@@ -19,7 +19,7 @@ inputs:
|
||||
description: Developer ID Application certificate password.
|
||||
required: false
|
||||
apple-api-key:
|
||||
description: App Store Connect API private key path.
|
||||
description: App Store Connect API private key contents, base64, or path.
|
||||
required: false
|
||||
apple-api-key-id:
|
||||
description: App Store Connect API key ID.
|
||||
@@ -55,13 +55,31 @@ runs:
|
||||
env:
|
||||
CSC_LINK: ${{ inputs.csc-link }}
|
||||
CSC_KEY_PASSWORD: ${{ inputs.csc-key-password }}
|
||||
APPLE_API_KEY: ${{ inputs.apple-api-key }}
|
||||
APPLE_API_KEY_INPUT: ${{ 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: |
|
||||
if [[ "${{ steps.signing.outputs.signing_enabled }}" == "false" ]]; then
|
||||
unset CSC_LINK CSC_KEY_PASSWORD APPLE_API_KEY APPLE_API_KEY_ID APPLE_API_ISSUER
|
||||
else
|
||||
if [[ -f "$APPLE_API_KEY_INPUT" ]]; then
|
||||
export APPLE_API_KEY="$APPLE_API_KEY_INPUT"
|
||||
else
|
||||
export APPLE_API_KEY="$RUNNER_TEMP/sketchforge-notary-${{ inputs.arch }}.p8"
|
||||
node <<'NODE'
|
||||
const fs = require("node:fs");
|
||||
const input = process.env.APPLE_API_KEY_INPUT || "";
|
||||
const output = process.env.APPLE_API_KEY;
|
||||
const decoded = input.includes("BEGIN PRIVATE KEY")
|
||||
? input
|
||||
: Buffer.from(input, "base64").toString("utf8");
|
||||
if (!decoded.includes("BEGIN PRIVATE KEY")) {
|
||||
throw new Error("APPLE_API_KEY must be a .p8 path, key contents, or base64-encoded key contents.");
|
||||
}
|
||||
fs.writeFileSync(output, decoded, { mode: 0o600 });
|
||||
NODE
|
||||
fi
|
||||
fi
|
||||
npm run desktop:dist -- --publish never --mac --${{ inputs.arch }} \
|
||||
"-c.mac.artifactName=\${productName}-\${version}-\${arch}${{ steps.signing.outputs.artifact_suffix }}.\${ext}"
|
||||
@@ -74,9 +92,14 @@ runs:
|
||||
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
|
||||
if [[ "${{ steps.signing.outputs.signing_enabled }}" == "true" ]]; then
|
||||
test -f dist/desktop/latest-mac.yml
|
||||
else
|
||||
rm -f dist/desktop/latest-mac.yml
|
||||
fi
|
||||
|
||||
- name: Rename macOS update manifest
|
||||
if: steps.signing.outputs.signing_enabled == 'true'
|
||||
shell: bash
|
||||
run: mv dist/desktop/latest-mac.yml "dist/desktop/latest-mac-${{ inputs.arch }}.yml"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user