Skip to content

Commit

Permalink
feat: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
theajack committed Feb 22, 2023
1 parent 3086f08 commit d126c75
Showing 1 changed file with 44 additions and 46 deletions.
90 changes: 44 additions & 46 deletions .github/workflows/eb-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ jobs:
node-version: '16'
registry-url: https://registry.npmjs.org

# - name: Determine npm cache directory
# id: npm-cache
# run: |
# echo "::set-output name=dir::$(npm config get cache)"
- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
# - name: Restore npm cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.npm-cache.outputs.dir }}
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
- name: Restore npm cache
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# - name: Npm Install pnpm
# run: npm install -g pnpm
- name: Npm Install pnpm
run: npm install -g pnpm

# - name: pnpm Install
# run: pnpm install --no-frozen-lockfile
- name: pnpm Install
run: pnpm install --no-frozen-lockfile

# - name: Version
# id: version
# run: |
# tag=${GITHUB_REF/refs\/tags\//}
# version=${tag#v}
# echo "::set-output name=version::${version}"
- name: Version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
echo "::set-output name=version::${version}"
- name: Build # build npm
env:
Expand All @@ -53,38 +53,36 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "theajack"
git checkout master
npm run test:ci
npx lerna bootstrap
npx lerna version ${{ steps.version.outputs.version }} --no-git-tag-version --force-publish --yes
npm run build
npm run build:docs
git add .
git commit -m "feat: Version test Publish"
git commit -m "feat: Version ${{ steps.version.outputs.version }} Build"
npx lerna publish from-package --yes
npm run init:dev -- ${{ steps.version.outputs.version }}
git add .
git commit -m "feat: Version ${{ steps.version.outputs.version }} Publish"
git push origin master
# - name: Pages # github pages
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: docs
- name: Pages # github pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs

# npx lerna bootstrap
# npx lerna version ${{ steps.version.outputs.version }} --no-git-tag-version --force-publish --yes
# npm run build
# npm run build:docs
# git add .
# git commit -m "feat: Version ${{ steps.version.outputs.version }} Build"
# npx lerna publish from-package --yes
# npm run init:monorepo -- ${{ steps.version.outputs.version }}
# git add .
# - name: Release # release
# uses: release-drafter/release-drafter@v5
# with:
# version: ${{ steps.version.outputs.version }}
# publish: true
# env:
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Release # release
uses: release-drafter/release-drafter@v5
with:
version: ${{ steps.version.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

# - name: Publish # npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
# run: npm run eb:publish -- ${{ steps.version.outputs.version }}

# - name: Purge # purge cdn
# run: npm run eb:purge -- ${{ steps.version.outputs.version }}
- name: Purge # purge cdn
run: npm run eb:purge -- ${{ steps.version.outputs.version }}

0 comments on commit d126c75

Please sign in to comment.