Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @thehairy
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
182 changes: 182 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: Build and Release App

on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '**.github/workflows/*'
workflow_dispatch:

permissions:
contents: write
# pages: write
# id-token: write

# concurrency:
# group: "pages"
# cancel-in-progress: false

jobs:
release:
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Xcode Select Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

# - name: Setup Certificate
# uses: apple-actions/import-codesign-certs@v2
# with:
# p12-file-base64: ${{ secrets.P12_CERTIFICATE_BASE64 }}
# p12-password: ${{ secrets.P12_PASSWORD }}

- name: Setup get-next-version
run: |
curl -L -o get-next-version https://github.com/thenativeweb/get-next-version/releases/download/2.6.3/get-next-version-darwin-arm64
chmod a+x get-next-version
sudo mv get-next-version /usr/local/bin

- name: Get Next Version
id: get_next_version
run: |
OUTPUT=$(get-next-version --target json)
NEXT_VERSION=$(echo $OUTPUT | jq -r '.version')
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT

- name: Bump version in Config.xcconfig
run: |
CURRENT_BUILD=$(grep BUILD_NUMBER iRPC/Config.xcconfig | cut -d ' ' -f 3)
NEW_BUILD=$((CURRENT_BUILD + 1))
sed -i '' "s/BUILD_NUMBER = $CURRENT_BUILD/BUILD_NUMBER = $NEW_BUILD/" iRPC/Config.xcconfig

CURRENT_VERSION=$(grep VERSION iRPC/Config.xcconfig | cut -d ' ' -f 3)
NEW_VERSION=${{ steps.get_next_version.outputs.version }}
sed -i '' "s/VERSION = $CURRENT_VERSION/VERSION = $NEW_VERSION/" iRPC/Config.xcconfig

- name: Build Changelog
uses: dlavrenuek/conventional-changelog-action@v1.2.3
id: changelog
with:
from: ${{ steps.get_next_version.outputs.current_version }}
to: HEAD

- name: Write Changelog
run: echo "${{ steps.changelog.outputs.body }}" > RELEASE.md

- name: Build macOS app
run: xcodebuild archive -scheme "iRPC" -configuration "Release" -archivePath "build/iRPC.xcarchive" -destination "generic/platform=macOS,name=Any Mac" CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO "OTHER_SWIFT_FLAGS=${inherited} -D GITHUB_RELEASE" | xcbeautify

# - name: Sign, Package and Notarize .app
# run: |
# cp -R "build/iRPC.xcarchive/Products/Applications/"*.app "build/iRPC.app"
# cd build
# codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "iRPC.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader"
# codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "iRPC.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/MacOS/Installer"
# codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "iRPC.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater"
# codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "iRPC.app/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate"
# codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "iRPC.app/Contents/MacOS/iRPC"
# codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "iRPC.app"
# npm install --global create-dmg
# create-dmg "iRPC.app" --overwrite
# mv *.dmg iRPC.dmg
# DMG_FILE="iRPC.dmg"
# echo "DMG_FILE=$DMG_FILE" >> $GITHUB_ENV
# xcrun notarytool submit "$DMG_FILE" --wait --apple-id "${{ secrets.NOTARIZATION_USERNAME }}" --password "${{ secrets.NOTARIZATION_PASSWORD }}" --team-id "L988J7YMK5"
# xcrun stapler staple "$DMG_FILE"

# - name: Configure Sparkle
# run: |
# curl -L -o Sparkle-2.4.2.tar.xz https://github.com/sparkle-project/Sparkle/releases/download/2.4.2/Sparkle-2.4.2.tar.xz
# tar -xJf Sparkle-2.4.2.tar.xz
# mkdir update
# mv "./build/$DMG_FILE" update/
# echo "${{ steps.changelog.outputs.body }}" > RELEASE.md
# chmod +x ./bin/generate_appcast

# - name: Convert Markdown to HTML
# uses: jaywcjlove/markdown-to-html-cli@main
# with:
# source: RELEASE.md
# output: ./update/${DMG_FILE%.dmg}.html
# github-corners: false

# - name: Generate appcast.xml
# run: echo "$EDDSA_PRIVATE_KEY" | ./bin/generate_appcast --ed-key-file - --link https://iRPCmac.app --embed-release-notes --download-url-prefix https://github.com/castdrian/iRPC/releases/latest/download/ update/
# env:
# EDDSA_PRIVATE_KEY: ${{ secrets.EDDSA_PRIVATE_KEY }}
# ARCHIVES_SOURCE_DIR: .

# - name: Archive appcast.xml as artifact
# uses: actions/upload-artifact@v4
# with:
# name: appcast
# path: ./update/appcast.xml

- name: Create App Archive
run: |
cp -R "build/iRPC.xcarchive/Products/Applications/"*.app "iRPC.app"
zip -r iRPC.zip iRPC.app
rm -rf iRPC.app

- name: Commit & Push changes
uses: EndBug/add-and-commit@v9
with:
add: 'iRPC/Config.xcconfig'
default_author: github_actions
fetch: false
message: 'Bump version [skip ci]'
push: true

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_next_version.outputs.version }}
body_path: RELEASE.md
files: iRPC.zip
fail_on_unmatched_files: true
token: ${{ env.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# pages:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# needs: release
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Download appcast.xml artifact
# uses: actions/download-artifact@v4
# with:
# name: appcast
# path: ./

# - name: Setup Pages
# uses: actions/configure-pages@v3

# - name: Build with Jekyll
# uses: actions/jekyll-build-pages@v1
# with:
# source: ./
# destination: ./_site

# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3

# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
12 changes: 8 additions & 4 deletions iRPC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,15 @@
};
F4BE1C3E2DC94AD6009B622C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = F4BE1C332DC94AD5009B622C /* iRPC */;
baseConfigurationReferenceRelativePath = Config.xcconfig;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = iRPC/iRPC.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
DEVELOPMENT_TEAM = F2VS4PRAT5;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
Expand All @@ -278,7 +280,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = "$(VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = dev.stabenow.iRPC;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand All @@ -289,13 +291,15 @@
};
F4BE1C3F2DC94AD6009B622C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = F4BE1C332DC94AD5009B622C /* iRPC */;
baseConfigurationReferenceRelativePath = Config.xcconfig;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = iRPC/iRPC.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
DEVELOPMENT_TEAM = F2VS4PRAT5;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
Expand All @@ -307,7 +311,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = "$(VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = dev.stabenow.iRPC;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iRPC.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
12 changes: 12 additions & 0 deletions iRPC/Config.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Config.xcconfig
// iRPC
//
// Created by Adrian Castro on 7/5/25.
//

// Configuration settings file format documentation can be found at:
// https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project

BUILD_NUMBER = 1
VERSION = 1.0.0
3 changes: 3 additions & 0 deletions iRPC/iRPCApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ struct iRPCApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

var body: some Scene {
WindowGroup {
EmptyView()
}
}
}