Skip to content

Commit

Permalink
Merge pull request #34 from iseebi/release/0.8.0
Browse files Browse the repository at this point in the history
Release/0.8.0
  • Loading branch information
iseebi authored Dec 21, 2024
2 parents 5011f3a + 5ef36b4 commit 147b287
Show file tree
Hide file tree
Showing 184 changed files with 12,673 additions and 13,618 deletions.
52 changes: 12 additions & 40 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ on:

jobs:
release:
runs-on: ${{ matrix.os }}
runs-on: macos-14
permissions:
contents: write

strategy:
matrix:
# os: [macos-latest-large, ubuntu-latest, windows-latest]
os: [macos-14, windows-latest]

steps:
- name: Check out Git repository
uses: actions/checkout@v1
Expand All @@ -29,7 +24,6 @@ jobs:
node-version: 18

- name: Install Developer ID Certificate
if: startsWith(matrix.os, 'macos')
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
Expand All @@ -50,55 +44,33 @@ jobs:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}

- name: Prepare for app notarization
if: startsWith(matrix.os, 'macos')
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.NOTARIZATION_API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.NOTARIZATION_API_KEY_ID }}.p8
- name: Build CLI Packages
if: startsWith(matrix.os, 'macos')
- name: Build
run: |
npm install
npm run build:cli
npm run build:cli-package
npm run build
- name: Notarization
run: |
npm run notarization
env:
KEY_PATH: ~/private_keys/AuthKey_${{ secrets.NOTARIZATION_API_KEY_ID }}.p8
KEY_ID: ${{ secrets.NOTARIZATION_API_KEY_ID }}
ISSUER_ID: ${{ secrets.NOTARIZATION_API_KEY_ISSUER }}

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mac_certs: ${{ secrets.MAC_CERTS }}
mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }}
env:
APPLE_TEAM_ID: ${{ secrets.MAC_TEAM_ID }}
APPLE_API_KEY: ~/private_keys/AuthKey_${{ secrets.NOTARIZATION_API_KEY_ID }}.p8
APPLE_API_KEY_ID: ${{ secrets.NOTARIZATION_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.NOTARIZATION_API_KEY_ISSUER }}

- name: Attach CLI Packages
if: ${{ startsWith(github.ref, 'refs/tags/v') && startsWith(matrix.os, 'macos') }}
- name: Attach Packages
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
gh release upload ${{ github.ref_name }} dist/hoshi-cli*.zip
gh release upload ${{ github.ref_name }} dist/hoshi-cli*.dmg
gh release create ${{ github.ref_name }} --generate-notes --draft
gh release upload ${{ github.ref_name }} dist/*.*
env:
GH_TOKEN: ${{ github.token }}

- name: Clean up keychain and provisioning profile
if: ${{ always() && startsWith(matrix.os, 'macos') }}
if: ${{ always() }}
run: |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
rm -r ~/private_keys/
# - name: Store artifacts
# uses: actions/upload-artifact@v3
# with:
# name: build-artifacts
# path: |
# dist/*.AppImage
# dist/*.dmg*
# dist/*.zip*
# dist/*.exe*
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ out
_published
*.log*

src/**/*.d.ts
!src/renderer/src/env.d.ts
!src/preload/index.d.ts
packages/*/src/**/*.d.ts
7 changes: 7 additions & 0 deletions .idea/biome.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

499 changes: 498 additions & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# electronのビルドのために各パッケージごとにnode_modulesを作成する
# install-strategy = "nested"
32 changes: 32 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 120
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
16 changes: 0 additions & 16 deletions build/cli_build.sh

This file was deleted.

45 changes: 0 additions & 45 deletions build/cli_package.sh

This file was deleted.

12 changes: 12 additions & 0 deletions build/notarization.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

target="$1"

xcrun notarytool submit --wait "$target" --key "$KEY_PATH" --key-id "$KEY_ID" --issuer "$ISSUER_ID"

# dmgの場合はstaple
if [[ $target == *.dmg ]]; then
sleep 5
xcrun stapler staple "$target"
fi

21 changes: 21 additions & 0 deletions build/run_notarization.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
notarization_script="./build/notarization.sh"

wait_pids() {
for pid in "$@"; do
#echo "wait $pid"
if ! wait "$pid"; then
echo "Error detected" 1>&2
exit 1
fi
done
}

pids=()

while IFS= read -r file; do
$notarization_script "$file" &
pids+=($!)
done < <(find ./dist -name '*mac*.zip' -or -name '*.dmg')

wait_pids "${pids[@]}"
22 changes: 0 additions & 22 deletions electron.vite.config.ts

This file was deleted.

20 changes: 0 additions & 20 deletions jest.config.cjs

This file was deleted.

Loading

0 comments on commit 147b287

Please sign in to comment.