Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish
on:
workflow_call:

permissions:
contents: read
id-token: write # Required for OIDC

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: npm release
run: |
npm ci
npm publish
20 changes: 8 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
actions: write
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24
Comment on lines +22 to +24

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to bump also node for tests?

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: npm install
- run: npm test
Expand Down Expand Up @@ -90,6 +93,9 @@ jobs:
platform: ios
pm: yarn
steps:
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24
Comment on lines +96 to +98

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, here, why the bump of version?

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: react-native-hcaptcha
Expand Down Expand Up @@ -141,18 +147,8 @@ jobs:
filename: .github/examples-issue-template.md

release:
permissions:
contents: read
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: npm release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm ci
npm publish
- uses: ./.github/workflows/publish.yaml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/*
yarn.lock
.idea

# Reassure performance testing files
.reassure/
Loading