Skip to content

Commit 9054098

Browse files
Publishing without release GitHub Action (#366)
* new publishing GA * removed comments Co-authored-by: Cedric Guillemet <[email protected]>
1 parent 69b80a1 commit 9054098

File tree

4 files changed

+243
-0
lines changed

4 files changed

+243
-0
lines changed

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

.github/workflows/typescript.yml

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

.github/workflows/windows.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)