diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index deb389d..0b20bf1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 821984d..6c27e36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - beta - "[0-9]+.[0-9]+.x" pull_request: types: [opened, synchronize, reopened] diff --git a/package.json b/package.json index 77ac99b..cb6ed76 100644 --- a/package.json +++ b/package.json @@ -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",