Skip to content

Commit

Permalink
workflow consolidation (#383)
Browse files Browse the repository at this point in the history
Co-authored-by: Cedric Guillemet <[email protected]>
  • Loading branch information
CedricGuillemet and CedricGuillemetMS authored Mar 31, 2022
1 parent 1f4361c commit 1d103a7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 134 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ios_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
react-native-version:
required: true
type: string
release-version:
required: true
type: string

jobs:
Build:
Expand All @@ -31,7 +34,7 @@ jobs:
run: npm install
working-directory: ./Package
- name: Gulp
run: npx gulp --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ github.event.release.name }}
run: npx gulp --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.release-version }}
working-directory: ./Package
- name: Upload Assembled iOS Android Folder
uses: actions/upload-artifact@v2
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/ios_android_tag.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,30 @@ jobs:
uses: ./.github/workflows/ios_android.yml
with:
react-native-version: 0.64
release-version: ${GITHUB_REF/refs\/tags\//}

build-android-ios-065:
uses: ./.github/workflows/ios_android.yml
with:
react-native-version: 0.65
release-version: ${GITHUB_REF/refs\/tags\//}

build-windows-064:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.64
release-version: ${GITHUB_REF/refs\/tags\//}

build-windows-065:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.65
release-version: ${GITHUB_REF/refs\/tags\//}

build-typescript:
uses: ./.github/workflows/typescript.yml
with:
release-version: ${GITHUB_REF/refs\/tags\//}

package:
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-windows-064, build-windows-065]
Expand Down Expand Up @@ -103,6 +109,6 @@ jobs:
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
working-directory: ./Package/Assembled-Windows0.64
working-directory: ./Package/Assembled-Windows0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/publish_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
description: 'NPM Release Version'
required: true
type: string
default: 0.0.1
default: 1.0.0
NPM_tag:
description: 'NPM Tag'
required: true
Expand All @@ -15,31 +15,31 @@ on:

jobs:
build-android-ios-064:
uses: ./.github/workflows/ios_android_tag.yml
uses: ./.github/workflows/ios_android.yml
with:
react-native-version: 0.64
release-version: ${{ github.event.inputs.release_version }}

build-android-ios-065:
uses: ./.github/workflows/ios_android_tag.yml
uses: ./.github/workflows/ios_android.yml
with:
react-native-version: 0.65
release-version: ${{ github.event.inputs.release_version }}

build-windows-064:
uses: ./.github/workflows/windows_tag.yml
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.64
release-version: ${{ github.event.inputs.release_version }}

build-windows-065:
uses: ./.github/workflows/windows_tag.yml
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.65
release-version: ${{ github.event.inputs.release_version }}

build-typescript:
uses: ./.github/workflows/typescript_tag.yml
uses: ./.github/workflows/typescript.yml
with:
release-version: ${{ github.event.inputs.release_version }}

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: 'build Typescript'

on: [workflow_call]

on:
workflow_call:
inputs:
release-version:
required: true
type: string
jobs:
Build:
runs-on: macos-latest
Expand All @@ -20,7 +24,7 @@ jobs:
run: npm install
working-directory: ./Package
- name: Gulp
run: npx gulp buildTS --releaseVersion ${{ github.event.release.name }}
run: npx gulp buildTS --releaseVersion ${{ inputs.release-version }}
working-directory: ./Package
- name: Upload Assembled Folder
uses: actions/upload-artifact@v2
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/typescript_tag.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
react-native-version:
required: true
type: string
release-version:
required: true
type: string

jobs:
Build:
Expand All @@ -31,7 +34,7 @@ jobs:
run: npm install
working-directory: ./Package
- name: Git (Windows)
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ github.event.release.name }}
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.release-version }}
working-directory: ./Package
- name: Gulp (Windows)
run: npx gulp buildUWPPublish
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/windows_tag.yml

This file was deleted.

0 comments on commit 1d103a7

Please sign in to comment.