diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6564f1a..ea452f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -91,6 +91,9 @@ jobs: - test - verify-website if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + permissions: + id-token: write + contents: read steps: - uses: actions/checkout@v3 - name: Use Node.js @@ -109,9 +112,14 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: yarn dev - - run: yarn publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: | + if [[ "$GITHUB_REF" =~ -alpha ]]; then + npm publish --tag alpha + elif [[ "$GITHUB_REF" =~ -beta ]]; then + npm publish --tag beta + else + npm publish + fi deploy: name: Deploy to GitHub Pages runs-on: ubuntu-latest diff --git a/package.json b/package.json index 658f6c9..ac5da76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-accessible-dropdown-menu-hook", - "version": "4.0.0", + "version": "4.0.1", "description": "A simple Hook for creating fully accessible dropdown menus in React", "main": "dist/use-dropdown-menu.js", "types": "dist/use-dropdown-menu.d.ts",