Skip to content

Commit

Permalink
[feature] automated build and next release
Browse files Browse the repository at this point in the history
  • Loading branch information
ponsfrilus committed May 16, 2024
1 parent fc8d7d1 commit ad81b07
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/create-next-release.yml
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 }}
15 changes: 11 additions & 4 deletions .github/workflows/deploy-to-github-pages.yml
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
Expand All @@ -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]
Expand Down

0 comments on commit ad81b07

Please sign in to comment.