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): build macOS packages per architecture
This commit is contained in:
+11
-7
@@ -38,10 +38,10 @@ The workflow builds these packages:
|
|||||||
|
|
||||||
- Windows NSIS installer
|
- Windows NSIS installer
|
||||||
- Linux AppImage
|
- Linux AppImage
|
||||||
- macOS universal DMG
|
- macOS x64 DMG and ZIP
|
||||||
- macOS universal ZIP
|
- macOS arm64 DMG and ZIP
|
||||||
|
|
||||||
The macOS ZIP and `latest-mac.yml` file are required by `electron-updater`.
|
The macOS ZIP files and merged `latest-mac.yml` file are required by `electron-updater`.
|
||||||
|
|
||||||
## macOS signing and notarization
|
## macOS signing and notarization
|
||||||
|
|
||||||
@@ -56,15 +56,19 @@ The macOS job reads these repository secrets:
|
|||||||
When all signing and Apple notarization variables are present, the macOS artifacts use their normal names:
|
When all signing and Apple notarization variables are present, the macOS artifacts use their normal names:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
SketchForge-VERSION-universal.dmg
|
SketchForge-VERSION-x64.dmg
|
||||||
SketchForge-VERSION-universal.zip
|
SketchForge-VERSION-x64.zip
|
||||||
|
SketchForge-VERSION-arm64.dmg
|
||||||
|
SketchForge-VERSION-arm64.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
When one or more signing or Apple notarization variables are missing, the workflow marks the packages as unsigned:
|
When one or more signing or Apple notarization variables are missing, the workflow marks the packages as unsigned:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
SketchForge-VERSION-universal-unsigned.dmg
|
SketchForge-VERSION-x64-unsigned.dmg
|
||||||
SketchForge-VERSION-universal-unsigned.zip
|
SketchForge-VERSION-x64-unsigned.zip
|
||||||
|
SketchForge-VERSION-arm64-unsigned.dmg
|
||||||
|
SketchForge-VERSION-arm64-unsigned.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Unsigned packages trigger a Gatekeeper warning. Add the signing and notarization secrets before public distribution.
|
Unsigned packages trigger a Gatekeeper warning. Add the signing and notarization secrets before public distribution.
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ inputs:
|
|||||||
artifact-name:
|
artifact-name:
|
||||||
description: GitHub Actions artifact name.
|
description: GitHub Actions artifact name.
|
||||||
required: true
|
required: true
|
||||||
|
arch:
|
||||||
|
description: macOS architecture.
|
||||||
|
required: true
|
||||||
csc-link:
|
csc-link:
|
||||||
description: Developer ID Application certificate.
|
description: Developer ID Application certificate.
|
||||||
required: false
|
required: false
|
||||||
@@ -53,7 +56,7 @@ runs:
|
|||||||
APPLE_API_KEY_ID: ${{ inputs.apple-api-key-id }}
|
APPLE_API_KEY_ID: ${{ inputs.apple-api-key-id }}
|
||||||
APPLE_API_ISSUER: ${{ inputs.apple-api-issuer }}
|
APPLE_API_ISSUER: ${{ inputs.apple-api-issuer }}
|
||||||
run: |
|
run: |
|
||||||
npm run desktop:dist -- --publish never --mac --universal \
|
npm run desktop:dist -- --publish never --mac --${{ inputs.arch }} \
|
||||||
"-c.mac.artifactName=\${productName}-\${version}-\${arch}${{ steps.signing.outputs.artifact_suffix }}.\${ext}"
|
"-c.mac.artifactName=\${productName}-\${version}-\${arch}${{ steps.signing.outputs.artifact_suffix }}.\${ext}"
|
||||||
|
|
||||||
- name: Verify macOS artifacts
|
- name: Verify macOS artifacts
|
||||||
@@ -62,16 +65,20 @@ runs:
|
|||||||
VERSION: ${{ inputs.version }}
|
VERSION: ${{ inputs.version }}
|
||||||
run: |
|
run: |
|
||||||
suffix="${{ steps.signing.outputs.artifact_suffix }}"
|
suffix="${{ steps.signing.outputs.artifact_suffix }}"
|
||||||
test -f "dist/desktop/SketchForge-$VERSION-universal${suffix}.dmg"
|
test -f "dist/desktop/SketchForge-$VERSION-${{ inputs.arch }}${suffix}.dmg"
|
||||||
test -f "dist/desktop/SketchForge-$VERSION-universal${suffix}.zip"
|
test -f "dist/desktop/SketchForge-$VERSION-${{ inputs.arch }}${suffix}.zip"
|
||||||
test -f dist/desktop/latest-mac.yml
|
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
|
- name: Store macOS artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact-name }}
|
name: ${{ inputs.artifact-name }}
|
||||||
path: |
|
path: |
|
||||||
dist/desktop/SketchForge-*-universal*.dmg
|
dist/desktop/SketchForge-*-${{ inputs.arch }}*.dmg
|
||||||
dist/desktop/SketchForge-*-universal*.zip
|
dist/desktop/SketchForge-*-${{ inputs.arch }}*.zip
|
||||||
dist/desktop/latest-mac.yml
|
dist/desktop/latest-mac-${{ inputs.arch }}.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@@ -33,8 +33,13 @@ jobs:
|
|||||||
runner: ubuntu-latest
|
runner: ubuntu-latest
|
||||||
artifact: desktop-linux
|
artifact: desktop-linux
|
||||||
- platform: macos
|
- platform: macos
|
||||||
runner: macos-latest
|
runner: macos-15-intel
|
||||||
artifact: desktop-macos
|
artifact: desktop-macos-x64
|
||||||
|
arch: x64
|
||||||
|
- platform: macos
|
||||||
|
runner: macos-14
|
||||||
|
artifact: desktop-macos-arm64
|
||||||
|
arch: arm64
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
@@ -95,6 +100,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ steps.package.outputs.version }}
|
version: ${{ steps.package.outputs.version }}
|
||||||
artifact-name: ${{ matrix.artifact }}
|
artifact-name: ${{ matrix.artifact }}
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
csc-link: ${{ secrets.CSC_LINK }}
|
csc-link: ${{ secrets.CSC_LINK }}
|
||||||
csc-key-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
csc-key-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
apple-api-key: ${{ secrets.APPLE_API_KEY }}
|
apple-api-key: ${{ secrets.APPLE_API_KEY }}
|
||||||
@@ -184,11 +190,45 @@ jobs:
|
|||||||
name: desktop-linux
|
name: desktop-linux
|
||||||
path: dist/release
|
path: dist/release
|
||||||
|
|
||||||
- name: Download macOS artifacts
|
- name: Download macOS x64 artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: desktop-macos
|
name: desktop-macos-x64
|
||||||
path: dist/release
|
path: dist/release/macos-x64
|
||||||
|
|
||||||
|
- name: Download macOS arm64 artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: desktop-macos-arm64
|
||||||
|
path: dist/release/macos-arm64
|
||||||
|
|
||||||
|
- name: Merge macOS update manifests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
npm ci --ignore-scripts
|
||||||
|
node <<'NODE'
|
||||||
|
const fs = require("node:fs");
|
||||||
|
const yaml = require("js-yaml");
|
||||||
|
const paths = [
|
||||||
|
"dist/release/macos-x64/latest-mac-x64.yml",
|
||||||
|
"dist/release/macos-arm64/latest-mac-arm64.yml",
|
||||||
|
];
|
||||||
|
const manifests = paths.map((file) => yaml.load(fs.readFileSync(file, "utf8")));
|
||||||
|
const merged = {
|
||||||
|
...manifests[0],
|
||||||
|
files: manifests.flatMap((manifest) => manifest.files || []),
|
||||||
|
};
|
||||||
|
delete merged.path;
|
||||||
|
delete merged.sha512;
|
||||||
|
fs.writeFileSync("dist/release/latest-mac.yml", yaml.dump(merged, { noRefs: true }));
|
||||||
|
for (const directory of ["macos-x64", "macos-arm64"]) {
|
||||||
|
for (const file of fs.readdirSync(`dist/release/${directory}`)) {
|
||||||
|
if (file === "latest-mac-x64.yml" || file === "latest-mac-arm64.yml") continue;
|
||||||
|
fs.renameSync(`dist/release/${directory}/${file}`, `dist/release/${file}`);
|
||||||
|
}
|
||||||
|
fs.rmSync(`dist/release/${directory}`, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
NODE
|
||||||
|
|
||||||
- name: Create draft release
|
- name: Create draft release
|
||||||
env:
|
env:
|
||||||
@@ -240,8 +280,10 @@ jobs:
|
|||||||
"latest.yml" \
|
"latest.yml" \
|
||||||
"SketchForge-$VERSION-x86_64.AppImage" \
|
"SketchForge-$VERSION-x86_64.AppImage" \
|
||||||
"latest-linux.yml" \
|
"latest-linux.yml" \
|
||||||
"SketchForge-$VERSION-universal${suffix}.dmg" \
|
"SketchForge-$VERSION-x64${suffix}.dmg" \
|
||||||
"SketchForge-$VERSION-universal${suffix}.zip" \
|
"SketchForge-$VERSION-x64${suffix}.zip" \
|
||||||
|
"SketchForge-$VERSION-arm64${suffix}.dmg" \
|
||||||
|
"SketchForge-$VERSION-arm64${suffix}.zip" \
|
||||||
"latest-mac.yml"; do
|
"latest-mac.yml"; do
|
||||||
grep -Fxq "$expected" <<< "$names" || {
|
grep -Fxq "$expected" <<< "$names" || {
|
||||||
echo "GitHub release is missing $expected" >&2
|
echo "GitHub release is missing $expected" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user