diff --git a/.env.example b/.env.example index c505db4..4c2525d 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,10 @@ -APP_NAME=LaraJobs +APP_NAME="LaraJobs Desktop" APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost -NATIVEPHP_APP_NAME="LaraJobs" +NATIVEPHP_APP_NAME="LaraJobs Desktop" NATIVEPHP_APP_VERSION="1.0.0" NATIVEPHP_APP_ID="com.larajobs.desktop" NATIVEPHP_DEEPLINK_SCHEME="larajobs" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36374a2..30423c7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,9 +30,16 @@ jobs: - name: Install Node dependencies run: npm install + - name: Prepare Laravel Application + run: | + cp .env.example .env + - name: Run install run: php artisan native:install --force --no-interaction + - name: Inject App Icon + run: cp public/images/icon.png vendor/nativephp/electron/resources/js/build/icon.png + - name: Run build run: php artisan native:publish --no-interaction env: @@ -41,15 +48,6 @@ jobs: NATIVEPHP_APPLE_ID: ${{ secrets.NATIVEPHP_APPLE_ID }} NATIVEPHP_APPLE_ID_PASS: ${{ secrets.NATIVEPHP_APPLE_ID_PASS }} NATIVEPHP_APPLE_TEAM_ID: ${{ secrets.NATIVEPHP_APPLE_TEAM_ID }} - GITHUB_REPO: larajobs-desktop - GITHUB_OWNER: ${{ github.repository_owner }} + GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NATIVEPHP_UPDATER_ENABLED: true - - - uses: actions/upload-artifact@v3 - with: - name: dist - path: | - dist/*.dmg - dist/*.zip - dist/*.yml diff --git a/app/Jobs/FetchNewJobs.php b/app/Jobs/FetchNewJobs.php index f6f3c67..b644f1c 100644 --- a/app/Jobs/FetchNewJobs.php +++ b/app/Jobs/FetchNewJobs.php @@ -8,7 +8,6 @@ use App\Events\JobsPosted; use App\Services\RSSDataService; use Carbon\Carbon; -use Config; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; diff --git a/config/nativephp.php b/config/nativephp.php index 5d1a69c..eb7dd81 100644 --- a/config/nativephp.php +++ b/config/nativephp.php @@ -58,8 +58,8 @@ 'providers' => [ 'github' => [ 'driver' => 'github', - 'repo' => env('GITHUB_REPO'), - 'owner' => env('GITHUB_OWNER'), + 'repo' => str_contains(env('GITHUB_REPOSITORY', ''), '/') ? explode('/', env('GITHUB_REPOSITORY'))[1] : env('GITHUB_REPO'), + 'owner' => str_contains(env('GITHUB_REPOSITORY', ''), '/') ? explode('/', env('GITHUB_REPOSITORY'))[0] : env('GITHUB_OWNER'), 'vPrefixedTagName' => true, 'token' => env('GITHUB_TOKEN'), 'private' => false, diff --git a/public/images/icon.png b/public/images/icon.png new file mode 100644 index 0000000..452408b Binary files /dev/null and b/public/images/icon.png differ