|
| 1 | +name: publish |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + release-type: |
| 7 | + required: true |
| 8 | + description: The type of release we are building. It could be commitly, release or dry-run |
| 9 | + type: string |
| 10 | + |
| 11 | +jobs: |
| 12 | + publish: |
| 13 | + runs-on: 8-core-ubuntu |
| 14 | + container: |
| 15 | + image: reactnativecommunity/react-native-android:latest |
| 16 | + env: |
| 17 | + TERM: "dumb" |
| 18 | + GRADLE_OPTS: "-Dorg.gradle.daemon=false" |
| 19 | + env: |
| 20 | + HERMES_WS_DIR: /tmp/hermes |
| 21 | + ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} |
| 22 | + ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} |
| 23 | + ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }} |
| 24 | + ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }} |
| 25 | + steps: |
| 26 | + - name: Checkout |
| 27 | + uses: actions/checkout@v4 |
| 28 | + - name: Setup git safe folders |
| 29 | + shell: bash |
| 30 | + run: git config --global --add safe.directory '*' |
| 31 | + - name: Create /tmp/hermes/osx-bin directory |
| 32 | + shell: bash |
| 33 | + run: mkdir -p /tmp/hermes/osx-bin |
| 34 | + - name: Download osx-bin release artifacts |
| 35 | + uses: actions/download-artifact@v4 |
| 36 | + with: |
| 37 | + name: hermes-osx-bin-Release |
| 38 | + path: /tmp/hermes/osx-bin/Release |
| 39 | + - name: Download osx-bin debug artifacts |
| 40 | + uses: actions/download-artifact@v4 |
| 41 | + with: |
| 42 | + name: hermes-osx-bin-Debug |
| 43 | + path: /tmp/hermes/osx-bin/Debug |
| 44 | + - name: Download darwin-bin release artifacts |
| 45 | + uses: actions/download-artifact@v4 |
| 46 | + with: |
| 47 | + name: hermes-darwin-bin-Release |
| 48 | + path: /tmp/hermes/hermes-runtime-darwin |
| 49 | + - name: Download darwin-bin debug artifacts |
| 50 | + uses: actions/download-artifact@v4 |
| 51 | + with: |
| 52 | + name: hermes-darwin-bin-Debug |
| 53 | + path: /tmp/hermes/hermes-runtime-darwin |
| 54 | + - name: Download hermes dSYM debug artifacts |
| 55 | + uses: actions/download-artifact@v4 |
| 56 | + with: |
| 57 | + name: hermes-dSYM-Debug |
| 58 | + path: /tmp/hermes/dSYM/Debug |
| 59 | + - name: Download hermes dSYM release vartifacts |
| 60 | + uses: actions/download-artifact@v4 |
| 61 | + with: |
| 62 | + name: hermes-dSYM-Release |
| 63 | + path: /tmp/hermes/dSYM/Release |
| 64 | + - name: Download windows-bin artifacts |
| 65 | + uses: actions/download-artifact@v4 |
| 66 | + with: |
| 67 | + name: hermes-win64-bin |
| 68 | + path: /tmp/hermes/win64-bin |
| 69 | + - name: Download linux-bin artifacts |
| 70 | + uses: actions/download-artifact@v4 |
| 71 | + with: |
| 72 | + name: hermes-linux-bin |
| 73 | + path: /tmp/hermes/linux64-bin |
| 74 | + - name: Show /tmp/hermes directory |
| 75 | + shell: bash |
| 76 | + run: ls -lR /tmp/hermes |
| 77 | + - name: Copy Hermes binaries |
| 78 | + shell: bash |
| 79 | + run: | |
| 80 | + mkdir -p ./android/ios-artifacts/artifacts/ |
| 81 | + cp $HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz ./android/ios-artifacts/artifacts/hermes-ios-debug.tar.gz |
| 82 | + cp $HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz ./android/ios-artifacts/artifacts/hermes-ios-release.tar.gz |
| 83 | + cp $HERMES_WS_DIR/dSYM/Debug/hermes.framework.dSYM ./android/ios-artifacts/artifacts/hermes-framework-dSYM-debug.tar.gz |
| 84 | + cp $HERMES_WS_DIR/dSYM/Release/hermes.framework.dSYM ./android/ios-artifacts/artifacts/hermes-framework-dSYM-release.tar.gz |
| 85 | + - name: Print Artifacts Directory |
| 86 | + shell: bash |
| 87 | + run: ls -lR ./android/ios-artifacts/artifacts/ |
| 88 | + - name: Setup node.js |
| 89 | + uses: ./.github/actions/setup-node |
| 90 | + - name: Install dependencies |
| 91 | + uses: ./.github/actions/yarn-install |
| 92 | + - name: Publish artifacts |
| 93 | + shell: bash |
| 94 | + run: | |
| 95 | + node ./utils/scripts/hermes/publish-artifacts.js -t ${{ inputs.release-type }} |
0 commit comments