Skip to content

Commit 7bb8a38

Browse files
authored
chore: Test workflow calls the release workflow as a dry-run for node (#107)
* call the release file * modify workflow to work on pull requests * remove default value * rename workflow * use publish workflow only when release is set from a workflow dispatch * modify workflow name
1 parent d8ab8f4 commit 7bb8a38

File tree

2 files changed

+9
-42
lines changed

2 files changed

+9
-42
lines changed

.github/workflows/release-node-bindings.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node Napi Cross compile testing
1+
name: Node Bindings
22
env:
33
DEBUG: napi:*
44
APP_NAME: node-eth-kzg
@@ -12,11 +12,15 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
1519
workflow_dispatch:
1620
inputs:
1721
ref:
1822
description: The reference (branch/tag/commit) to checkout
19-
required: true
23+
required: false
2024
release-type:
2125
type: choice
2226
required: false
@@ -51,7 +55,7 @@ jobs:
5155
steps:
5256
- uses: actions/checkout@v4
5357
with:
54-
ref: ${{ inputs.ref }}
58+
ref: ${{ inputs.ref || github.ref }}
5559
- name: Setup node
5660
uses: actions/setup-node@v4
5761
with:
@@ -132,7 +136,7 @@ jobs:
132136
steps:
133137
- uses: actions/checkout@v4
134138
with:
135-
ref: ${{ inputs.ref }}
139+
ref: ${{ inputs.ref || github.ref }}
136140
- name: Setup node
137141
uses: actions/setup-node@v4
138142
with:
@@ -230,7 +234,7 @@ jobs:
230234
- name: Move artifacts
231235
run: yarn artifacts
232236
- name: Publish
233-
if: ${{ inputs.release-type != 'none' }}
237+
if: ${{ inputs.release-type != 'none' && github.event_name == 'workflow_dispatch' }}
234238
run: |
235239
# TODO: We could remove the yarnpkg registry and set the npmregistry
236240
# TODO: globally, by doing: yarn config set registry <registry-url>

.github/workflows/test-node-bindings.yml

-37
This file was deleted.

0 commit comments

Comments
 (0)