diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 5de5e82..0dd7528 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -10,18 +10,16 @@ on: jobs: release: runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install NPM dependencies - run: npm ci - - name: Build library - run: npm run build - - - name: Publish library to github packages and npm + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - run: npm ci + - run: npm run build + - run: npx semantic-release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a168f9d..a3e673b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,28 +14,27 @@ permissions: jobs: release: runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install NPM dependencies - run: npm ci - - name: Build library and storybook - run: npm run build && npm run build-storybook + steps: + - uses: actions/checkout@v4 + - uses: actions/configure-pages@v2 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - run: npm ci + - run: npm run build && npm run build-storybook - - name: Setup pages. - uses: actions/configure-pages@v2 - name: Upload artifact. uses: actions/upload-pages-artifact@v1 with: path: ./storybook-static/ + - name: Publish storybook build to github pages id: deployment uses: actions/deploy-pages@v1 - - name: Publish library to github packages and npm + - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release