Skip to content

Commit d88a7d1

Browse files
committed
chore: bump react provider
1 parent 4d6dee1 commit d88a7d1

4 files changed

Lines changed: 50 additions & 34 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,27 @@ on:
44
push:
55
branches-ignore:
66
- 'release-please*'
7+
workflow_dispatch:
8+
inputs:
9+
package:
10+
description: 'Package to publish'
11+
required: true
12+
type: choice
13+
options:
14+
- sdk
15+
- sdk-react-provider
16+
- openapi
17+
dry_run:
18+
description: 'Dry-run only (no actual publish)'
19+
required: false
20+
type: boolean
21+
default: false
722

823
permissions: write-all
924

1025
jobs:
1126
release-please:
27+
if: github.event_name == 'push'
1228
runs-on: ubuntu-latest
1329
outputs:
1430
release_created_sdk: ${{ steps.release.outputs['packages/sdk--release_created'] }}
@@ -40,14 +56,13 @@ jobs:
4056
echo "Release sha: ${{ steps.release.outputs.sha }}"
4157
4258
build:
59+
if: github.event_name == 'push'
4360
env:
4461
CI: 'true'
45-
4662
needs: [release-please]
4763
name: Build, Test and Lint
4864
timeout-minutes: 15
4965
runs-on: ubuntu-latest
50-
5166
steps:
5267
- uses: actions/checkout@v4
5368
with:
@@ -80,42 +95,60 @@ jobs:
8095

8196
publish-sdk:
8297
needs: [release-please, build]
83-
if: needs.release-please.outputs.release_created_sdk == 'true'
98+
if: |
99+
always() &&
100+
needs.build.result != 'failure' &&
101+
(
102+
needs.release-please.outputs.release_created_sdk == 'true' ||
103+
(github.event_name == 'workflow_dispatch' && inputs.package == 'sdk')
104+
)
84105
permissions:
85106
id-token: write
86107
contents: read
87108
uses: ./.github/workflows/publish.yml
88109
secrets: inherit
89110
with:
90111
package: sdk
91-
dry_run: false
92-
skip_checks: true
112+
dry_run: ${{ inputs.dry_run == true }}
113+
skip_checks: ${{ github.event_name == 'push' }}
93114

94115
publish-sdk-react-provider:
95116
needs: [release-please, build]
96-
if: needs.release-please.outputs.release_created_sdk_react_provider == 'true'
117+
if: |
118+
always() &&
119+
needs.build.result != 'failure' &&
120+
(
121+
needs.release-please.outputs.release_created_sdk_react_provider == 'true' ||
122+
(github.event_name == 'workflow_dispatch' && inputs.package == 'sdk-react-provider')
123+
)
97124
permissions:
98125
id-token: write
99126
contents: read
100127
uses: ./.github/workflows/publish.yml
101128
secrets: inherit
102129
with:
103130
package: sdk-react-provider
104-
dry_run: false
105-
skip_checks: true
131+
dry_run: ${{ inputs.dry_run == true }}
132+
skip_checks: ${{ github.event_name == 'push' }}
106133

107134
publish-openapi:
108135
needs: [release-please, build]
109-
if: needs.release-please.outputs.release_created_openapi == 'true'
136+
if: |
137+
always() &&
138+
needs.build.result != 'failure' &&
139+
(
140+
needs.release-please.outputs.release_created_openapi == 'true' ||
141+
(github.event_name == 'workflow_dispatch' && inputs.package == 'openapi')
142+
)
110143
permissions:
111144
id-token: write
112145
contents: read
113146
uses: ./.github/workflows/publish.yml
114147
secrets: inherit
115148
with:
116149
package: openapi
117-
dry_run: false
118-
skip_checks: true
150+
dry_run: ${{ inputs.dry_run == true }}
151+
skip_checks: ${{ github.event_name == 'push' }}
119152

120153
# ── Deploy docs to GitHub Pages ───────────────────────────────────────────────
121154

@@ -124,7 +157,7 @@ jobs:
124157
name: github-pages
125158
runs-on: ubuntu-latest
126159
needs: [build, release-please]
127-
if: github.ref == 'refs/heads/main'
160+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
128161
steps:
129162
- name: Deploy to GitHub Pages
130163
id: docs-deployment

.github/workflows/publish.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
name: Publish
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
package:
7-
description: 'Package to publish'
8-
required: true
9-
type: choice
10-
options:
11-
- all
12-
- sdk
13-
- sdk-react-provider
14-
- openapi
15-
dry_run:
16-
description: 'Dry-run only (no actual publish)'
17-
required: false
18-
type: boolean
19-
default: false
20-
skip_checks:
21-
description: 'Skip test and lint steps'
22-
required: false
23-
type: boolean
24-
default: false
254
workflow_call:
265
inputs:
276
package:

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ The pipeline will automatically publish the following packages if there are chan
9090
- `@monerium/openapi` at 'packages/openapi'
9191
- TBD: `@repo/ui` at 'packages/ui'
9292

93+
We use OIDC - Trusted Publisher to publish to NPM.
94+
`Workflow filename` has to match the filename that triggers the publishing, in our case `ci.yml`
95+
See: https://www.npmjs.com/package/@monerium/sdk/access
96+
9397
#### Useful links
9498

9599
[Release please - Github action](https://github.com/marketplace/actions/release-please-action)

packages/sdk-react-provider/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
| [Monerium.com](https://monerium.com/) | [Monerium.app](https://monerium.app/) | [Monerium Dev Docs](https://docs.monerium.com/) |
22
| ------------------------------------- | ------------------------------------- | ----------------------------------------------- |
33

4-
# Monerium SDK React Provider
4+
# Monerium SDK React Provider.
55

66
This package depends on the SDK, it's currently pinned to v3.5.
77

0 commit comments

Comments
 (0)