-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44ff2de
commit fabf448
Showing
29 changed files
with
116 additions
and
1,147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# TODO: | ||
# - Re-enable app signing once Bun supports it https://github.com/oven-sh/bun/issues/7208 | ||
# - Upload Bun servers to the Github release for headless use | ||
# - Add Windows and Ubuntu signing someday | ||
|
||
name: Build/release | ||
on: | ||
push: | ||
|
@@ -23,7 +28,6 @@ jobs: | |
name: build | ||
path: build | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
needs: build | ||
permissions: | ||
contents: write | ||
|
@@ -37,24 +41,23 @@ jobs: | |
- platform: 'macos-latest' # for Intel based macs. | ||
args: '--target x86_64-apple-darwin' | ||
arch: 'x86_64-apple-darwin' | ||
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. | ||
- platform: 'ubuntu-24.04' # for Tauri v1 you could replace this with ubuntu-20.04. | ||
args: '' | ||
arch: 'x86_64-unknown-linux-gnu' | ||
- platform: 'windows-latest' | ||
args: '' | ||
arch: 'x86_64-pc-windows-msvc' | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{env.GITHUB_REF}} | ||
ref: alpha | ||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. | ||
if: matrix.platform == 'ubuntu-24.04' # This must match the platform value defined above. | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | ||
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. | ||
# You can remove the one that doesn't apply to your app to speed up the workflow a bit. | ||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
|
@@ -75,37 +78,96 @@ jobs: | |
name: build | ||
path: build | ||
- name: Build Bun Server | ||
run: BUILD_ARCH=${{ matrix.settings.arch}} bun run build:server | ||
run: bun run build:server | ||
env: | ||
BUILD_ARCH: ${{ matrix.settings.arch }} | ||
- name: Prepare for app notarization | ||
if: startsWith(matrix.os, 'macos') | ||
if: startsWith(matrix.platform, 'macos') | ||
# Import Apple API key for app notarization on macOS | ||
run: | | ||
mkdir -p ~/private_keys/ | ||
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 | ||
- name: Import Apple Developer Certificate | ||
if: startsWith(matrix.platform, 'macos') | ||
env: | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
run: | | ||
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 | ||
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain | ||
security default-keychain -s build.keychain | ||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain | ||
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain | ||
security find-identity -v -p codesigning build.keychain | ||
- name: Verify Certificate | ||
if: startsWith(matrix.platform, 'macos') | ||
env: | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
run: | | ||
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Apple Development") | ||
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}') | ||
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV | ||
echo "Certificate imported." | ||
- name: Get Tauri Version | ||
if: startsWith(matrix.platform, 'windows') | ||
id: get-version | ||
shell: node {0} | ||
run: | | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
try { | ||
const configPath = path.join(process.cwd(), 'src-tauri', 'tauri.conf.json'); | ||
const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); | ||
const version = config.version.replace('alpha.', ''); | ||
// Write to GITHUB_OUTPUT environment file | ||
const outputFile = process.env.GITHUB_OUTPUT; | ||
fs.appendFileSync(outputFile, `version=${version}\n`); | ||
} catch (error) { | ||
console.error('Error processing version:', error); | ||
process.exit(1); | ||
} | ||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Signing | ||
APPLE_CERTIFICATE: ${{ secrets.MAC_CERTS }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }} | ||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
# Disabling code signing until this issue is resolved https://github.com/oven-sh/bun/issues/7208 | ||
# # Signing | ||
# APPLE_CERTIFICATE: ${{ secrets.MAC_CERTS }} | ||
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }} | ||
# APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }} | ||
|
||
# Notarization | ||
APPLE_API_ISSUER: ${{ secrets.API_KEY_ISSUER_ID }} | ||
APPLE_API_KEY: ${{ secrets.api_key_id }} | ||
APPLE_API_KEY_PATH: ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 | ||
# # Notarization | ||
# APPLE_API_ISSUER: ${{ secrets.API_KEY_ISSUER_ID }} | ||
# APPLE_API_KEY: ${{ secrets.api_key_id }} | ||
# APPLE_API_KEY_PATH: ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 | ||
|
||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
# APPLE_ID: ${{ secrets.APPLE_ID }} | ||
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
with: | ||
appVersion: ${{ steps.get-version.outputs.version }} | ||
tagName: __VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | ||
releaseName: '__VERSION__' | ||
releaseBody: 'See the assets to download this version and install.' | ||
releaseDraft: true | ||
prerelease: false | ||
args: ${{ matrix.settings.args }} | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v2 | ||
if: failure() | ||
- uses: little-core-labs/[email protected] | ||
id: tagName | ||
- name: Upload headless | ||
run: | | ||
gh release upload ${{ steps.tagName.outputs.tag }} src-tauri/binaries/* | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Setup tmate session | ||
# uses: mxschmitt/action-tmate@v2 | ||
# if: failure() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,9 @@ | |
}, | ||
}, | ||
}, | ||
"patchedDependencies": { | ||
"@thorium-sim/[email protected]": "patches/@thorium-sim%[email protected]", | ||
}, | ||
"packages": { | ||
"@alloc/quick-lru": ["@alloc/[email protected]", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="], | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.