Skip to content

Commit

Permalink
feat: set up pre-release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Oct 24, 2024
1 parent 383b5cd commit 526d7a4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,40 @@ on:
push:
branches:
- master
- beta
- "[0-9]+.[0-9]+.x"

permissions:
contents: read # for checkout

jobs:
release:
name: release
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- run: npm ci
- run: npm run build
- run: npx semantic-release
node-version: 22

- name: Install dependencies
run: npm ci

- name: Run build
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release@^24
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- beta
- "[0-9]+.[0-9]+.x"
pull_request:
types: [opened, synchronize, reopened]
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"type": "git",
"url": "https://github.com/react-dropzone/file-selector.git"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"prebuild": "npm run clean",
"build": "npm-run-all -s compile build:umd",
Expand Down

0 comments on commit 526d7a4

Please sign in to comment.