Skip to content

Commit 72d5fa6

Browse files
jonkoopsrolandjitsu
authored andcommitted
feat: set up pre-release workflow
Signed-off-by: Jon Koops <[email protected]>
1 parent 383b5cd commit 72d5fa6

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,40 @@ on:
33
push:
44
branches:
55
- master
6+
- beta
67
- "[0-9]+.[0-9]+.x"
78

9+
permissions:
10+
contents: read # for checkout
11+
812
jobs:
913
release:
10-
name: release
14+
name: Release
1115
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write # to be able to publish a GitHub release
18+
issues: write # to be able to comment on released issues
19+
pull-requests: write # to be able to comment on released pull requests
20+
id-token: write # to enable use of OIDC for npm provenance
1221
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v1
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0 # fetch all history
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
1529
with:
16-
node-version: "20.x"
17-
- run: npm ci
18-
- run: npm run build
19-
- run: npx semantic-release
30+
node-version: 22
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Run build
36+
run: npm run build
37+
38+
- name: Release
2039
env:
2140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2241
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
run: npx semantic-release@^24

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- master
6+
- beta
67
- "[0-9]+.[0-9]+.x"
78
pull_request:
89
types: [opened, synchronize, reopened]

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"type": "git",
2828
"url": "https://github.com/react-dropzone/file-selector.git"
2929
},
30+
"publishConfig": {
31+
"access": "public"
32+
},
3033
"scripts": {
3134
"prebuild": "npm run clean",
3235
"build": "npm-run-all -s compile build:umd",

0 commit comments

Comments
 (0)