Skip to content

Commit

Permalink
Merge pull request #1219 from andrew-bierman/andrew_testing
Browse files Browse the repository at this point in the history
testing -> main
  • Loading branch information
andrew-bierman authored Sep 6, 2024
2 parents 48a952b + 844a027 commit 084ff79
Show file tree
Hide file tree
Showing 109 changed files with 2,678 additions and 771 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ PUBLIC_X_RAPIDAPI_KEY="Your api key"
PUBLIC_MAPBOX_ACCESS_TOKEN="Your api key, starts with pk..."
PUBLIC_MAPBOX_DOWNLOADS_TOKEN="Your api key, starts with sk..."
PUBLIC_MAPBOX_DOWNLOADS_TOKEN2="Your api key, starts with sk..."
PUBLIC_BUGSNAG_API_KEY="Bugsnag api key"


# Google OAuth
PUBLIC_WEB_CLIENT_ID="Your Google OAuth web client ID"
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/changeset-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: 🛠 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -26,6 +26,24 @@ jobs:
uses: changesets/action@v1
with:
version: yarn changeset version
commit: "🔖 chore: version bump and changelog"
commit: '🔖 chore: version bump and changelog'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 📝 Bump version and generate changelog
run: |
git fetch --all
git checkout main
npx changeset version
git add .
git commit -m "Version packages and generate changelog"
git push --follow-tags
- name: 📦 Create GitHub Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body_path: ./CHANGELOG.md
draft: false
prerelease: false
79 changes: 15 additions & 64 deletions .github/workflows/tauri-build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: tauri-build
name: Tauri Build and Publish

on:
push:
branches: ['**']
pull_request:
branches: ['**']
tags:
- 'v*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -30,7 +29,7 @@ jobs:
args: ''

permissions:
contents: read
contents: write
pull-requests: write

steps:
Expand Down Expand Up @@ -72,65 +71,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# tagName: app-v__VERSION__
# releaseName: 'App v__VERSION__'
# releaseBody: 'See the assets to download this version and install.'
# releaseDraft: true
# prerelease: false
tagName: ${{ github.ref_name }}
releaseName: 'App v${{ github.ref_name }}'
releaseBody: 'See the assets to download this version and install.'
draft: false
prerelease: false
args: ${{ matrix.args }}

- name: Find or create comment
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
id: find_or_create_comment
- name: Upload Tauri Artifacts (RPM and DEB)
uses: actions/upload-artifact@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const commentIdentifier = '<!-- build_results -->';
const comments = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
const existingComment = comments.data.find(comment => comment.body.startsWith(commentIdentifier));
if (existingComment) {
core.setOutput('comment_id', existingComment.id);
} else {
const commentBody = `${commentIdentifier}\n🚀 Tauri build started... Please wait for the results! 🕐`;
const { data: { id: commentId } } = await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
});
core.setOutput('comment_id', commentId);
}
- name: Update PR comment
if: always() && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const commentIdentifier = '<!-- build_results -->';
const commentId = '${{ steps.find_or_create_comment.outputs.comment_id }}';
const buildOutcome = '${{ job.status }}';
const buildStatus = buildOutcome == 'success' ? 'completed' : 'failed';
const workflowUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
let commentBody = `${commentIdentifier}\nTauri build ${buildStatus}!`;
if (buildOutcome == 'success') {
commentBody += `\nYou can download the build artifacts from the following link:\n${workflowUrl}#artifacts`;
} else {
commentBody += '\nPlease check the workflow logs for more details on the build failure.';
}
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: commentId,
body: commentBody
});
name: tauri-artifacts-${{ matrix.platform }}
path: |
apps/tauri/src-tauri/target/release/bundle/deb/**
apps/tauri/src-tauri/target/release/bundle/rpm/**
2 changes: 1 addition & 1 deletion apps/bun-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "tsc"
},
"devDependencies": {
"typescript": "^5.3.3"
"typescript": "^5.5.3"
},
"dependencies": {
"@elysiajs/html": "^0.7.3",
Expand Down
20 changes: 14 additions & 6 deletions apps/expo/app.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
{
"expo": {
"name": "packrat",
"name": "Packrat",
"slug": "packrat",
"version": "1.0.0",
"version": "1.1.0",
"orientation": "portrait",
"icon": "./assets/packrat-app-icon.png",
"userInterfaceStyle": "automatic",
"scheme": "packrat",
"splash": {
"image": "./assets/splash.png"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.andrewbierman.packrat"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/packrat-app-icon.png",
"backgroundColor": "#ffffff"
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#026A9F"
},
"package": "com.andrewbierman.packrat"
},
Expand Down Expand Up @@ -46,10 +49,15 @@
"buildToolsVersion": "34.0.0"
},
"ios": {
"deploymentTarget": "13.4"
"deploymentTarget": "13.4",
"buildNumber": "3",
"infoPlist": {
"ITSAppUsesNonExemptEncryption": false
}
}
}
]
],
["./translucent-default-splash-screen-config"]
],
"extra": {
"eas": {
Expand Down
Binary file modified apps/expo/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/expo/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion apps/expo/eas.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cli": {
"version": ">= 3.8.1"
"version": ">= 3.8.1",
"appVersionSource": "remote"
},
"build": {
"development": {
Expand All @@ -21,6 +22,7 @@
}
},
"production": {
"autoIncrement": true,
"ios": {
"resourceClass": "m-medium"
}
Expand Down
1 change: 1 addition & 0 deletions apps/expo/env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN="Your api key, starts with pk..."
EXPO_PUBLIC_ANDROID_CLIENT_ID="962352557394-........................apps.googleusercontent.com"
EXPO_PUBLIC_IOS_CLIENT_ID="962352557394-........................apps.googleusercontent.com"
MAPBOX_DOWNLOADS_TOKEN="Your api key, starts with sk..."
EXPO_PUBLIC_BUGSNAG_API_KEY="Bugsnag api key"

13 changes: 8 additions & 5 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"dependencies": {
"@babel/runtime": "^7.21.0",
"@bugsnag/expo": "^50.0.0",
"@expo/match-media": "^0.4.0",
"@expo/metro-runtime": "~3.1.3",
"@expo/vector-icons": "^14.0.0",
Expand All @@ -54,7 +55,7 @@
"@reduxjs/toolkit": "^1.9.3",
"@rneui/base": "^4.0.0-rc.8",
"@rneui/themed": "^4.0.0-rc.8",
"@rnmapbox/maps": "^10.1.21",
"@rnmapbox/maps": "^10.1.29",
"@tamagui/animations-react-native": "1.96.0",
"@tamagui/babel-plugin": "1.96.0",
"@tamagui/config": "1.96.0",
Expand Down Expand Up @@ -84,22 +85,24 @@
"env": "^0.0.2",
"eslint-plugin-react-native": "^4.0.0",
"expo": "^50.0.14",
"expo-application": "~5.8.3",
"expo-application": "~5.8.4",
"expo-auth-session": "~5.4.0",
"expo-blur": "~12.9.2",
"expo-build-properties": "~0.11.1",
"expo-checkbox": "~2.7.0",
"expo-clipboard": "~5.0.1",
"expo-constants": "~15.4.5",
"expo-constants": "~15.4.6",
"expo-crypto": "~12.8.1",
"expo-dev-client": "~3.3.11",
"expo-device": "~5.9.4",
"expo-document-picker": "~11.10.1",
"expo-file-system": "~16.0.8",
"expo-file-system": "~16.0.9",
"expo-font": "~11.10.3",
"expo-haptics": "~12.8.1",
"expo-image-picker": "~14.7.1",
"expo-linear-gradient": "~12.7.2",
"expo-linking": "~6.2.2",
"expo-local-authentication": "~13.8.0",
"expo-location": "~16.5.5",
"expo-random": "~13.6.0",
"expo-router": "~3.4.10",
Expand Down Expand Up @@ -174,7 +177,7 @@
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"prettier": "^3.2.5",
"typescript": "^5.3.3"
"typescript": "^5.5.3"
},
"overrides": {
"metro": "0.73.7",
Expand Down
39 changes: 39 additions & 0 deletions apps/expo/translucent-default-splash-screen-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @module withSplashWindowIsTranslucent
* @description Custom expo plugin that makes the {@link https://developer.android.com/develop/ui/views/launch/splash-screen/migrate|default splash screen (android 12+)} transparent.
* This is a temporary work around for the {@link https://github.com/zoontek/react-native-bootsplash/issues/496|double splash screen issue}.
*
*
* Credits: {@link https://github.com/expo/expo/issues/16084#issuecomment-1261330440}
*/

const { AndroidConfig, withAndroidStyles } = require('@expo/config-plugins');

const withSplashWindowIsTranslucent = (config) => {
return withAndroidStyles(config, async (config) => {
config.modResults = await configureFullScreenDialog(config.modResults);
return config;
});
};

async function configureFullScreenDialog(styles) {
const splashScreen = styles.resources.style.find(
(style) => style.$.name === 'Theme.App.SplashScreen',
);

if (splashScreen) {
splashScreen.item = splashScreen.item.filter(
(item) => item.$.name !== 'android:windowIsTranslucent',
);
splashScreen.item.push(
AndroidConfig.Resources.buildResourceItem({
name: 'android:windowIsTranslucent',
value: true,
}),
);
}

return styles;
}

module.exports = withSplashWindowIsTranslucent;
2 changes: 1 addition & 1 deletion apps/tauri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-typescript2": "^0.36.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"typescript": "^5.5.3",
"vite": "^5.3.1",
"vite-plugin-node-polyfills": "^0.21.0"
}
Expand Down
Loading

0 comments on commit 084ff79

Please sign in to comment.