-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] automated build and next release
- Loading branch information
1 parent
fc8d7d1
commit ad81b07
Showing
2 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build & Release next | ||
|
||
on: | ||
push: | ||
branches: | ||
- next | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'next' | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build the library | ||
run: npm run build | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Create release | ||
uses: Roang-zero1/github-create-release-action@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload release artifacts | ||
uses: Roang-zero1/github-upload-release-artifacts-action@v2 | ||
with: | ||
args: "dist/*" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
name: Deploy Storybook to GitHub Pages | ||
|
||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-1].*" | ||
# tags: | ||
# - "v[0-1].*" | ||
branches: | ||
- next | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'next' | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
|
@@ -21,7 +28,7 @@ jobs: | |
run: npm install | ||
|
||
- name: Build Storybook | ||
run: npm run build | ||
run: npx storybook build | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
|