-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(publish): add github action auto publish
- Loading branch information
Showing
3 changed files
with
90 additions
and
41 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,85 @@ | ||
name: Auto All Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
outputs: | ||
publishVersion: ${{ steps.parseTag.outputs.publishVersion }} | ||
steps: | ||
- name: CheckOut Code | ||
uses: actions/checkout@master | ||
with: | ||
ref: dev | ||
|
||
- name: Parse Tag | ||
id: parseTag | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const tag = `${{ github.ref_name }}` | ||
const publishVersion = tag.slice(3) | ||
core.setOutput('publishVersion', publishVersion) | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.10.0 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm i --no-frozen-lockfile | ||
|
||
- name: Run Build Components | ||
run: pnpm build:ui -t ${{ steps.parseTag.outputs.publishVersion }} | ||
|
||
- name: Run Build Sass Common | ||
run: pnpm build:ui saas-common -t ${{ steps.parseTag.outputs.publishVersion }} -d saas | ||
|
||
- name: Run Build Runtime | ||
run: pnpm build:runtime | ||
|
||
- name: Run Build Theme | ||
run: pnpm build:theme | ||
|
||
- name: Run Build Renderless | ||
run: pnpm build:renderless | ||
|
||
- name: Run Build ThemeSaas | ||
run: pnpm build:themeSaas | ||
|
||
- name: Run Build ThemeMobile | ||
run: pnpm build:themeMobile | ||
|
||
- name: Publish Vue3 And Vue2 components | ||
run: pnpm pub:all | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Release | ||
if: contains(github.ref_name, 'alpha') == false | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
generate_release_notes: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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