Skip to content

Commit be32d5a

Browse files
preview with tag scripts (#378)
Co-authored-by: Cedric Guillemet <[email protected]>
1 parent ddc607e commit be32d5a

File tree

4 files changed

+246
-0
lines changed

4 files changed

+246
-0
lines changed

.github/workflows/ios_android_tag.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: 'build ios-android'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
react-native-version:
7+
required: true
8+
type: string
9+
release-version:
10+
required: true
11+
type: string
12+
13+
jobs:
14+
Build:
15+
runs-on: macos-latest
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/[email protected]
19+
with:
20+
submodules: 'recursive'
21+
- name: Setup CMake
22+
uses: jwlawson/[email protected]
23+
with:
24+
cmake-version: '3.19.6' # See https://gitlab.kitware.com/cmake/cmake/-/issues/22021
25+
- name: Setup Ninja
26+
run: brew install ninja
27+
- name: NPM Install (Playground)
28+
run: npm install
29+
working-directory: ./Apps/Playground
30+
- name: Select React Native Version ${{ inputs.react-native-version }}
31+
run: npm run select --reactNative ${{ inputs.react-native-version }}
32+
working-directory: ./Apps/Playground
33+
- name: NPM Install (Binary Package)
34+
run: npm install
35+
working-directory: ./Package
36+
- name: Gulp
37+
run: npx gulp --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.release-version }}
38+
working-directory: ./Package
39+
- name: Upload Assembled iOS Android Folder
40+
uses: actions/upload-artifact@v2
41+
with:
42+
name: 'Assembled-iOSAndroid${{ inputs.react-native-version }}'
43+
path: Package/Assembled-iOSAndroid

.github/workflows/publish_preview.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Publish Package For Preview
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release_version:
6+
description: 'NPM Release Version'
7+
required: true
8+
type: string
9+
default: 0.0.1
10+
NPM_tag:
11+
description: 'NPM Tag'
12+
required: true
13+
type: string
14+
default: preview
15+
16+
jobs:
17+
build-android-ios-064:
18+
uses: ./.github/workflows/ios_android_tag.yml
19+
with:
20+
react-native-version: 0.64
21+
release-version: ${{ github.event.inputs.release_version }}
22+
23+
build-android-ios-065:
24+
uses: ./.github/workflows/ios_android_tag.yml
25+
with:
26+
react-native-version: 0.65
27+
release-version: ${{ github.event.inputs.release_version }}
28+
29+
build-windows-064:
30+
uses: ./.github/workflows/windows_tag.yml
31+
with:
32+
react-native-version: 0.64
33+
release-version: ${{ github.event.inputs.release_version }}
34+
35+
build-windows-065:
36+
uses: ./.github/workflows/windows_tag.yml
37+
with:
38+
react-native-version: 0.65
39+
release-version: ${{ github.event.inputs.release_version }}
40+
41+
build-typescript:
42+
uses: ./.github/workflows/typescript_tag.yml
43+
with:
44+
release-version: ${{ github.event.inputs.release_version }}
45+
46+
package:
47+
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-windows-064, build-windows-065]
48+
runs-on: macos-latest
49+
steps:
50+
- name: Checkout Repo
51+
uses: actions/[email protected]
52+
- name: NPM Install (Binary Package)
53+
run: npm install
54+
working-directory: ./Package
55+
- name: Download Assembled Folder
56+
uses: actions/download-artifact@v2
57+
with:
58+
name: 'Assembled'
59+
path: Package/Assembled
60+
- name: Download Assembled-iOSAndroid 0.64 Folder
61+
uses: actions/download-artifact@v2
62+
with:
63+
name: 'Assembled-iOSAndroid0.64'
64+
path: Package/Assembled-iOSAndroid0.64
65+
- name: Download Assembled-iOSAndroid 0.65 Folder
66+
uses: actions/download-artifact@v2
67+
with:
68+
name: 'Assembled-iOSAndroid0.65'
69+
path: Package/Assembled-iOSAndroid0.65
70+
- name: Download Assembled-Windows 0.64 Folder
71+
uses: actions/download-artifact@v2
72+
with:
73+
name: 'Assembled-Windows0.64'
74+
path: Package/Assembled-Windows0.64
75+
- name: Download Assembled-Windows 0.65 Folder
76+
uses: actions/download-artifact@v2
77+
with:
78+
name: 'Assembled-Windows0.65'
79+
path: Package/Assembled-Windows0.65
80+
- name: Display structure of downloaded Assembled and Assembled-Windows folders
81+
run: ls -R
82+
- name: Setup Node.js
83+
uses: actions/[email protected]
84+
with:
85+
node-version: '12.x'
86+
registry-url: 'https://registry.npmjs.org'
87+
scope: '@babylonjs'
88+
- name: Version & Publish Package @babylonjs/react-native
89+
run: |
90+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
91+
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
92+
working-directory: ./Package/Assembled
93+
env:
94+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
95+
96+
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-64
97+
run: |
98+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
99+
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
100+
working-directory: ./Package/Assembled-iOSAndroid0.64
101+
env:
102+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
103+
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-65
104+
run: |
105+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
106+
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
107+
working-directory: ./Package/Assembled-iOSAndroid0.65
108+
env:
109+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
110+
111+
- name: Version & Publish Package @babylonjs/react-native-windows-0-64
112+
run: |
113+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
114+
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
115+
working-directory: ./Package/Assembled-Windows0.64
116+
env:
117+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
118+
- name: Version & Publish Package @babylonjs/react-native-windows-0-65
119+
run: |
120+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
121+
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
122+
working-directory: ./Package/Assembled-Windows0.64
123+
env:
124+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/typescript_tag.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 'build Typescript'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
release-version:
7+
required: true
8+
type: string
9+
jobs:
10+
Build:
11+
runs-on: macos-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/[email protected]
15+
with:
16+
submodules: 'recursive'
17+
- name: NPM Install (Playground)
18+
run: npm install
19+
working-directory: ./Apps/Playground
20+
- name: Select React Native Version
21+
run: npm run select 0.64
22+
working-directory: ./Apps/Playground
23+
- name: NPM Install (Binary Package)
24+
run: npm install
25+
working-directory: ./Package
26+
- name: Gulp
27+
run: npx gulp buildTS --releaseVersion ${{ inputs.release-version }}
28+
working-directory: ./Package
29+
- name: Upload Assembled Folder
30+
uses: actions/upload-artifact@v2
31+
with:
32+
name: 'Assembled'
33+
path: Package/Assembled

.github/workflows/windows_tag.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'build windows'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
react-native-version:
7+
required: true
8+
type: string
9+
release-version:
10+
required: true
11+
type: string
12+
13+
jobs:
14+
Build:
15+
runs-on: windows-2019
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/[email protected]
19+
with:
20+
submodules: 'true'
21+
- name: Setup MSBuild
22+
uses: microsoft/[email protected]
23+
- name: Setup NuGet
24+
uses: nuget/setup-nuget@v1
25+
with:
26+
nuget-version: '5.x'
27+
- name: NPM Install (Playground)
28+
run: npm install
29+
working-directory: ./Apps/Playground
30+
- name: NPM Install (React Native ${{ inputs.react-native-version }})
31+
run: npm run select --reactNative ${{ inputs.react-native-version }}
32+
working-directory: ./Apps/Playground
33+
- name: NPM Install (Binary Package)
34+
run: npm install
35+
working-directory: ./Package
36+
- name: Git (Windows)
37+
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.release-version }}
38+
working-directory: ./Package
39+
- name: Gulp (Windows)
40+
run: npx gulp buildUWPPublish
41+
working-directory: ./Package
42+
- name: Upload Assembled-Windows Folder
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: 'Assembled-Windows${{ inputs.react-native-version }}'
46+
path: Package/Assembled-Windows

0 commit comments

Comments
 (0)