Skip to content

Commit 97df8fb

Browse files
committed
fix: Add missing permissions for GitHub Actions in release workflow
1 parent ce66da6 commit 97df8fb

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/workflows/cicd.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ jobs:
645645
# Generate both production and beta appcasts
646646
cat > generate_all_appcasts.swift << 'EOF'
647647
import Foundation
648+
#if canImport(FoundationNetworking)
649+
import FoundationNetworking
650+
#endif
648651
649652
struct GitHubRelease: Codable {
650653
let tagName: String
@@ -674,6 +677,15 @@ jobs:
674677
}
675678
}
676679
680+
func loadSignatures() -> [String: String] {
681+
guard let data = try? Data(contentsOf: URL(fileURLWithPath: "dist/signatures.json")),
682+
let signatures = try? JSONSerialization.jsonObject(with: data) as? [String: String] else {
683+
print("⚠️ No signatures found")
684+
return [:]
685+
}
686+
return signatures
687+
}
688+
677689
// Fetch releases from GitHub API
678690
let url = URL(string: "https://api.github.com/repos/${{ github.repository }}/releases")!
679691
let task = URLSession.shared.dataTask(with: url) { data, response, error in

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
required: true
1212
type: string
1313

14+
# Required permissions for GitHub Actions
15+
permissions:
16+
contents: write
17+
packages: read
18+
1419
env:
1520
APP_NAME: "ClickIt"
1621
BUNDLE_ID: "com.jsonify.clickit"

0 commit comments

Comments
 (0)