Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BabylonReactNative Basekit frontend package #615

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
73de5ac
append_release action
CedricGuillemet Oct 18, 2023
069dcb4
compress id must be unique
CedricGuillemet Oct 18, 2023
3cc8a96
reduce folder depth for tgz
CedricGuillemet Oct 20, 2023
9405baf
react-native-basekit
CedricGuillemet Oct 20, 2023
0a773ce
configuration and error handling
CedricGuillemet Oct 20, 2023
160ef8f
fix windows vcxproj
CedricGuillemet Oct 23, 2023
6455983
publish
CedricGuillemet Oct 24, 2023
6d72317
append_release for publishing check
CedricGuillemet Oct 24, 2023
009e40b
npm cache
CedricGuillemet Oct 24, 2023
96c21bf
test append to release
CedricGuillemet Oct 24, 2023
c2fa580
preview parameter check
CedricGuillemet Oct 24, 2023
d56ae83
breaking if
CedricGuillemet Oct 24, 2023
cf0d89d
testing boolean
CedricGuillemet Oct 24, 2023
bbcc38c
Merge branch 'master' into AppendRelease
CedricGuillemet Oct 24, 2023
f174f2f
Merge branch 'master' of https://github.com/BabylonJS/BabylonReactNat…
CedricGuillemet Oct 25, 2023
af5ba6a
rework install script
CedricGuillemet Oct 25, 2023
6a13be3
Merge branch 'AppendRelease' of https://github.com/cedricguillemet/Ba…
CedricGuillemet Oct 25, 2023
47bc45b
set java 17 as java 18 is not compatible with android projects
CedricGuillemet Oct 25, 2023
b857f1b
Readme and version check
CedricGuillemet Oct 25, 2023
534eda4
removed dry run for publish
CedricGuillemet Oct 25, 2023
648c79f
installation configuration
CedricGuillemet Oct 25, 2023
b752264
basekit package version set to 0.0.1
CedricGuillemet Oct 26, 2023
ce9bc16
feedback
CedricGuillemet Oct 27, 2023
386b677
tabs replaced with spaces
CedricGuillemet Nov 8, 2023
de255c6
missing java setup
CedricGuillemet Nov 8, 2023
6b4b76d
tar command
CedricGuillemet Nov 14, 2023
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
21 changes: 0 additions & 21 deletions .github/workflows/add_artifact_urls.yml

This file was deleted.

189 changes: 189 additions & 0 deletions .github/workflows/append_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: 'Append Release'
bghgary marked this conversation as resolved.
Show resolved Hide resolved

on:
workflow_call:
inputs:
release-name:
required: true
type: string
is-preview:
required: true
type: boolean
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Download Assembled Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled'
path: Package/react-native
- name: Compress Package react-native
uses: a7ul/tar-action@v1.1.3
id: compressreact-native
with:
command: c
cwd: Package/react-native/
files: | # all files except package.json and readme.md
BabylonModule.d.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better way to handle this? I would rather we avoid keeping lists in a yml file. Seems error-prone if someone adds a file and doesn't realize there is a list here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this is to avoid copying (and overwriting) package.json. I agree it's error-prone. atm, I only see more convoluted ways (a prepass that copies files, a js script that lists files,...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there were a way to exclude files for tar, would that work?

Copy link
Contributor Author

@CedricGuillemet CedricGuillemet Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we do a PR to https://github.com/a7ul/tar-action
Looks like we are not alone : a7ul/tar-action#21

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be okay to call tar from the shell?

BabylonModule.js
BabylonModule.js.map
EngineHook.d.ts
EngineHook.js
EngineHook.js.map
EngineView.d.ts
EngineView.js
EngineView.js.map
FontFace.d.ts
FontFace.js
FontFace.js.map
index.d.ts
index.js
index.js.map
NativeCapture.d.ts
NativeCapture.js
NativeCapture.js.map
NativeEngineHook.d.ts
NativeEngineHook.js
NativeEngineHook.js.map
NativeEngineView.d.ts
NativeEngineView.js
NativeEngineView.js.map
ReactNativeEngine.d.ts
ReactNativeEngine.js
ReactNativeEngine.js.map
shared
VersionValidation.d.ts
VersionValidation.js
VersionValidation.js.map
outPath: react-native.tar.gz

- name: Download Assembled-BaseKit-iOSAndroid 0.69 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-iOSAndroid0.69'
path: Package/iOSAndroid0.69
- name: Compress Package iOSAndroid0.69
uses: a7ul/tar-action@v1.1.3
id: compressiosandroid069
with:
command: c
cwd: Package/iOSAndroid0.69/
files: |
android
ios
react-native-babylon.podspec
outPath: iOSAndroid0.69.tar.gz

- name: Download Assembled-BaseKit-iOSAndroid 0.70 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-iOSAndroid0.70'
path: Package/iOSAndroid0.70
- name: Compress Package iOSAndroid0.70
uses: a7ul/tar-action@v1.1.3
id: compressiosandroid070
with:
command: c
cwd: Package/iOSAndroid0.70/
files: |
android
ios
react-native-babylon.podspec
outPath: iOSAndroid0.70.tar.gz

- name: Download Assembled-BaseKit-iOSAndroid 0.71 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-iOSAndroid0.71'
path: Package/iOSAndroid0.71
- name: Compress Package iOSAndroid0.71
uses: a7ul/tar-action@v1.1.3
id: compressiosandroid071
with:
command: c
cwd: Package/iOSAndroid0.71/
files: |
android
ios
react-native-babylon.podspec
outPath: iOSAndroid0.71.tar.gz

- name: Download Assembled-BaseKit-Windows 0.69 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-Windows0.69'
path: Package/Windows0.69
- name: Compress Package Windows0.69
uses: a7ul/tar-action@v1.1.3
id: compresswindows069
with:
command: c
cwd: Package/Windows0.69/
files: |
windows
index.ts
outPath: Windows0.69.tar.gz

- name: Download Assembled-BaseKit-Windows 0.70 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-Windows0.70'
path: Package/Windows0.70
- name: Compress Package Windows0.70
uses: a7ul/tar-action@v1.1.3
id: compresswindows070
with:
command: c
cwd: Package/Windows0.70/
files: |
windows
index.ts
outPath: Windows0.70.tar.gz

- name: Download Assembled-BaseKit-Windows 0.71 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-Windows0.71'
path: Package/Windows0.71
- name: Compress Package Windows0.71
uses: a7ul/tar-action@v1.1.3
id: compresswindows071
with:
command: c
cwd: Package/Windows0.71/
files: |
windows
index.ts
outPath: Windows0.71.tar.gz

- name: Preview Release
if: ${{ inputs.is-preview == 'true' }}
uses: softprops/action-gh-release@v1
with:
files: |
react-native.tar.gz
Windows0.69.tar.gz
Windows0.70.tar.gz
Windows0.71.tar.gz
iOSAndroid0.69.tar.gz
iOSAndroid0.70.tar.gz
iOSAndroid0.71.tar.gz
tag_name: ${{ inputs.release-name }}
name: ${{ inputs.release-name }}
body: "Preview release for ${{ inputs.release-name }}"
bghgary marked this conversation as resolved.
Show resolved Hide resolved
draft: true
prerelease: true

- name: Release
if: ${{ inputs.is-preview == 'false' }}
uses: softprops/action-gh-release@v1
with:
files: |
react-native.tar.gz
Windows0.69.tar.gz
Windows0.70.tar.gz
Windows0.71.tar.gz
iOSAndroid0.69.tar.gz
iOSAndroid0.70.tar.gz
iOSAndroid0.71.tar.gz
55 changes: 35 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ jobs:
with:
release-version: ${GITHUB_REF/refs\/tags\//}

append-release:
needs: [build-typescript, build-android-ios-069, build-android-ios-070, build-android-ios-071, build-windows-069, build-windows-070, build-windows-071]
uses: ./.github/workflows/append_release.yml
with:
release-name: ${GITHUB_REF/refs\/tags\//}
is-preview: false

package:
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-android-ios-069, build-android-ios-070, build-android-ios-071, build-windows-064, build-windows-065, build-windows-069, build-windows-070, build-windows-071]
runs-on: macos-latest
Expand Down Expand Up @@ -152,17 +159,17 @@ jobs:
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-Windows0.69'
path: Package/Assembled-Windows0.69
path: Package/Assembled-BaseKit-Windows0.69
- name: Download Assembled-BaseKit-Windows 0.70 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-Windows0.70'
path: Package/Assembled-Windows0.70
path: Package/Assembled-BaseKit-Windows0.70
- name: Download Assembled-BaseKit-Windows 0.71 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-BaseKit-Windows0.71'
path: Package/Assembled-Windows0.71
path: Package/Assembled-BaseKit-Windows0.71

- name: Display structure of downloaded Assembled and Assembled-Windows folders
run: ls -R
Expand All @@ -175,122 +182,130 @@ jobs:
- name: Version & Publish Package @babylonjs/react-native
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-64
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-iOSAndroid0.64
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-65
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-iOSAndroid0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-69
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-iOSAndroid0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-70
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-iOSAndroid0.70
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-71
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-iOSAndroid0.71
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Version & Publish Package @babylonjs/react-native-windows-0-64
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-Windows0.64
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-windows-0-65
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-Windows0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-windows-0-69
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-Windows0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-windows-0-70
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-Windows0.70
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-windows-0-71
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-Windows0.71
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
#BaseKit
- name: Version & Publish Package @babylonjs/react-native-basekit-iosandroid-0-69
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-BaseKit-iOSAndroid0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-basekit-iosandroid-0-70
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-BaseKit-iOSAndroid0.70
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-basekit-iosandroid-0-71
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-BaseKit-iOSAndroid0.71
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-basekit-windows-0-69
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-BaseKit-Windows0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-basekit-windows-0-70
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-BaseKit-Windows0.70
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-basekit-windows-0-71
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
npm publish --access public --dry-run
working-directory: ./Package/Assembled-BaseKit-Windows0.71
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# ROOT Basekit package
- name: Version & Publish Package @babylonjs/react-native-basekit
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public --dry-run
working-directory: ./Modules/@babylonjs/react-native-basekit
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading
Loading