Skip to content

Commit f3bedfd

Browse files
committed
chore: pin GH actions and remove release workflows
1 parent fdf9bed commit f3bedfd

14 files changed

Lines changed: 165 additions & 219 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Setup JS
2+
description: Sets up Node.js and install NPM dependencies
3+
4+
inputs:
5+
enable-cache:
6+
description: Determines if actions/setup-node will have cache enabled
7+
required: true
8+
type: boolean
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Setup Node.js (with cache)
14+
if: ${{ inputs.enable-cache }}
15+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
16+
with:
17+
cache: yarn
18+
node-version: 24
19+
20+
- name: Setup Node.js (without cache)
21+
if: ${{ !inputs.enable-cache }}
22+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
23+
with:
24+
node-version: 24
25+
26+
- name: Install NPM dependencies
27+
run: yarn install --immutable
28+
shell: bash

.github/workflows/build-docs.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/deploy-docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: deploy-docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "packages/react-native-avoid-softinput/**"
9+
- ".github/workflows/deploy-docs.yml"
10+
11+
jobs:
12+
prepare-docs:
13+
name: Prepare docs
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup JS
22+
uses: ./.github/actions/setup-js
23+
with:
24+
enable-cache: false
25+
26+
- name: Install Docs npm packages
27+
run: yarn docs/ install --immutable
28+
shell: bash
29+
30+
- name: Build Docs artifacts
31+
run: yarn docs/ build
32+
shell: bash
33+
34+
- name: Upload Build Artifact
35+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 #v5.0.0
36+
with:
37+
path: build
38+
39+
deploy-docs:
40+
name: Deploy docs
41+
runs-on: ubuntu-latest
42+
needs: prepare-docs
43+
44+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
45+
permissions:
46+
pages: write # to deploy to Pages
47+
id-token: write # to verify the deployment originates from an appropriate source
48+
49+
# Deploy to the github-pages environment
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
54+
steps:
55+
- name: Deploy to Github Pages
56+
id: deployment
57+
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 #v5.0.0

.github/workflows/lint-android.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ jobs:
1212
name: Lint Kotlin/Java
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/cache@v4
15+
- name: Checkout
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
1717
with:
18-
path: "**/node_modules"
19-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
20-
- name: Install modules
21-
uses: actions/setup-node@v4
18+
fetch-depth: 0
19+
20+
- name: Setup JS
21+
uses: ./.github/actions/setup-js
2222
with:
23-
cache: "yarn"
24-
registry-url: "https://registry.npmjs.org"
25-
cache-dependency-path: "**/yarn.lock"
23+
enable-cache: true
24+
2625
- name: Set Java version
27-
uses: actions/setup-java@v3
26+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 #v5.2.0
2827
with:
2928
distribution: 'temurin'
3029
java-version: '17'
31-
- run: yarn
32-
- name: Spotless/Ktfmt
30+
31+
- name: Lint Android (Spotless/Ktfmt)
3332
run: yarn lint:android
33+
shell: bash

.github/workflows/lint-ios.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,23 @@ on:
1010
jobs:
1111
lint-ios:
1212
name: Lint ObjC
13-
runs-on: macos-latest
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
path:
17+
- 'packages/react-native-avoid-softinput/ios'
1418
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/cache@v4
19+
- name: Checkout
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
1721
with:
18-
path: "**/node_modules"
19-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
20-
- name: Install modules
21-
uses: actions/setup-node@v4
22+
fetch-depth: 0
23+
24+
- name: Setup JS
25+
uses: ./.github/actions/setup-js
26+
with:
27+
enable-cache: true
28+
29+
- name: Run ClangFormat
30+
uses: jidicula/clang-format-action@654a770daa28443dd111d133e4083e21c1075674 #v4.18.0
2231
with:
23-
cache: "yarn"
24-
registry-url: "https://registry.npmjs.org"
25-
cache-dependency-path: "**/yarn.lock"
26-
- run: yarn
27-
- name: ClangFormat
28-
run: |
29-
#!/bin/bash
30-
if ! command -v clang-format &> /dev/null
31-
then
32-
echo "ClangFormat is not installed. Installing"
33-
brew install clang-format
34-
fi
35-
yarn format:ios:objc
32+
check-path: ${{ matrix.path }}

.github/workflows/lint-js.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,23 @@ jobs:
2727
name: Lint JS/TS
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v4
31-
- uses: actions/cache@v4
30+
- name: Checkout
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
3232
with:
33-
path: "**/node_modules"
34-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
35-
- name: Install modules
36-
uses: actions/setup-node@v4
33+
fetch-depth: 0
34+
35+
- name: Setup JS
36+
uses: ./.github/actions/setup-js
3737
with:
38-
cache: "yarn"
39-
registry-url: "https://registry.npmjs.org"
40-
cache-dependency-path: "**/yarn.lock"
41-
- run: yarn
38+
enable-cache: true
4239
- name: Lint JS/TS
4340
run: yarn lint:js
41+
shell: bash
42+
4443
- name: TypeScript
4544
run: yarn typescript
45+
shell: bash
46+
4647
- name: Prepare library
4748
run: yarn prepare
49+
shell: bash

.github/workflows/npm-release-template.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/pre-release.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/release-major.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/release-minor.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)