Skip to content

Commit

Permalink
ci: update node version and missed actions, try pass token
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Sep 16, 2024
1 parent ed6c8c2 commit 444d1a4
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ inputs:
runs:
using: composite
steps:
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: ${{ inputs.node-version }}
cache: 'npm'

- name: Install dependencies
Expand Down
8 changes: 6 additions & 2 deletions .github/actions/package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ inputs:
vtag:
description: The version tag to be used for the SDK
required: true
token:
description: The token used to remove artifacts
required: true

runs:
using: composite
steps:
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'

- name: Use JDK 11
- name: Use JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
Expand Down Expand Up @@ -100,6 +103,7 @@ runs:

- uses: geekyeggo/delete-artifact@v4
with:
token: ${{ env.token }}
name: |
android-build
ios-build
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- actions_tests
pull_request:

permissions:
actions: write

jobs:
android:
runs-on: ubuntu-20.04
Expand All @@ -21,7 +24,7 @@ jobs:
- name: Android build
uses: ./.github/actions/build-android
with:
node-version: '16.x'
node-version: '20.x'
java-version: '11'

ios:
Expand All @@ -39,7 +42,7 @@ jobs:
- name: iOS build
uses: ./.github/actions/build-ios
with:
node-version: '16.x'
node-version: '20.x'

js:
runs-on: ubuntu-latest
Expand All @@ -50,10 +53,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
cache: 'npm'

- name: Install dependencies
Expand All @@ -65,8 +68,6 @@ jobs:
package:
runs-on: macos-12
name: Package
permissions:
actions: write
env:
SDK_BUILD_CACHE_DIR: ${{ github.workspace }}/.native-modules
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
Expand All @@ -85,6 +86,7 @@ jobs:
- name: Package
uses: ./.github/actions/package
with:
node-version: '16.x'
node-version: '20.x'
java-version: '11'
vtag: ${{ env.vtag }}
token: ${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
cache: 'npm'
- run: npm ci
name: Install dependencies
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ on:
- Beta3
- Beta4

permissions:
actions: write

jobs:
validate:
runs-on: ubuntu-latest
Expand All @@ -31,7 +34,7 @@ jobs:
vtag: ${{ steps.vtag.outputs.vtag }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
Expand All @@ -43,7 +46,7 @@ jobs:
echo "vtag=${VTAG}" >> $GITHUB_ENV
echo "vtag=${VTAG}" >> $GITHUB_OUTPUT
- name: Validate version
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
vtag: ${{ env.vtag }}
with:
Expand All @@ -70,14 +73,14 @@ jobs:
USE_CCACHE: 1
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Android build
uses: ./.github/actions/build-android
with:
node-version: '16.x'
node-version: '20.x'
java-version: '11'

ios:
Expand All @@ -90,14 +93,14 @@ jobs:
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: iOS build
uses: ./.github/actions/build-ios
with:
node-version: '16.x'
node-version: '20.x'

package:
runs-on: macos-12
Expand All @@ -111,14 +114,15 @@ jobs:
needs: [validate, android, ios]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Package
uses: ./.github/actions/package
with:
node-version: '16.x'
token: ${{ github.token }}
node-version: '20.x'
java-version: '11'
vtag: ${{ env.vtag }}

Expand Down
6 changes: 3 additions & 3 deletions maintainer-docs/ci-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For example:
- name: Android build
uses: ./.github/actions/build-android
with:
node-version: '16.x'
node-version: '20.x'
java-version: '11'
```
Expand All @@ -89,7 +89,7 @@ For example:
- name: iOS build
uses: ./.github/actions/build-ios
with:
node-version: '16.x'
node-version: '20.x'
```

### Package
Expand All @@ -104,7 +104,7 @@ For example:
- name: Package
uses: ./.github/actions/package
with:
node-version: '16.x'
node-version: '20.x'
java-version: '11'
vtag: ${{ env.vtag }}
```

0 comments on commit 444d1a4

Please sign in to comment.