Skip to content

Commit 1b135f7

Browse files
authored
Use shared release action (#3994)
## Description Removes release scripts and related tests and uses [shared publish action](https://github.com/software-mansion-labs/npm-package-publish), which uses the same scripts. ## Test plan Tested it on a fork: - https://github.com/j-piasecki/react-native-gesture-handler/actions/runs/22343887406/job/64653421948 - https://github.com/j-piasecki/react-native-gesture-handler/actions/runs/22344178991/job/64654420340
1 parent 4285b4f commit 1b135f7

18 files changed

Lines changed: 21 additions & 1423 deletions

.github/actions/publish-npm-package/action.yml

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

.github/workflows/publish-release.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,35 @@ jobs:
4242
- name: Check out
4343
uses: actions/checkout@v4
4444

45+
- name: Set up environment
46+
shell: bash
47+
run: |
48+
echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV
49+
50+
- name: Setup Node
51+
uses: actions/setup-node@v6
52+
with:
53+
node-version: 24
54+
cache: 'yarn'
55+
registry-url: https://registry.npmjs.org/
56+
4557
- name: Publish manual release
4658
if: ${{ github.event_name == 'workflow_dispatch' }}
47-
uses: ./.github/actions/publish-npm-package
59+
uses: software-mansion-labs/npm-package-publish@main
4860
with:
61+
package-name: 'react-native-gesture-handler'
62+
package-json-path: 'packages/react-native-gesture-handler/package.json'
63+
install-dependencies-command: 'yarn install --immutable'
4964
release-type: ${{ inputs.release-type }}
5065
version: ${{ inputs.version }}
5166
dry-run: ${{ inputs.dry-run }}
5267

5368
- name: Publish automatic nightly release
5469
if: ${{ github.event_name == 'schedule' }}
55-
uses: ./.github/actions/publish-npm-package
70+
uses: software-mansion-labs/npm-package-publish@main
5671
with:
72+
package-name: 'react-native-gesture-handler'
73+
package-json-path: 'packages/react-native-gesture-handler/package.json'
74+
install-dependencies-command: 'yarn install --immutable'
5775
release-type: 'nightly'
5876
dry-run: false

.github/workflows/run-jest-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,5 @@ jobs:
3434
- name: Install node dependencies
3535
run: yarn --immutable
3636

37-
- name: Run jest scripts tests
38-
run: yarn test:scripts
39-
4037
- name: Run jest package tests
41-
# always run this step even if the previous step fails
42-
if: ${{ always() }}
4338
run: yarn workspace react-native-gesture-handler test

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"ts-check": "yarn workspaces foreach --all --parallel --topological-dev run ts-check",
1616
"lint-js": "yarn workspaces foreach --all --parallel --topological-dev run lint-js",
1717
"format-js": "yarn workspaces foreach --all --parallel --topological-dev run format-js",
18-
"clean": "yarn workspaces foreach --all --parallel --topological-dev run clean && rm -rf node_modules yarn.lock",
19-
"test:scripts": "jest ./scripts"
18+
"clean": "yarn workspaces foreach --all --parallel --topological-dev run clean && rm -rf node_modules yarn.lock"
2019
},
2120
"devDependencies": {
2221
"@types/react": "^19.0.12",

0 commit comments

Comments
 (0)