Skip to content

Commit

Permalink
Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Sep 9, 2024
1 parent bb3e411 commit b892c7f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
23 changes: 11 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b892c7f

Please sign in to comment.