Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyzak committed Nov 23, 2022
1 parent 26c8668 commit 4108d34
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,39 +61,39 @@ jobs:
echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "BUILD_TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
echo "BUILD_TIME=$(date "+%Y-%m-%d-%H-%M")" >> $GITHUB_ENV
- name: Set archive name
id: set_name
run: |
echo "DIST_ZIP_NAME=$(echo "${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION_NAME }}-${{env.BUILD_TIMESTAMP}}-${{ env.COMMIT_ID }}.zip")" >> $GITHUB_ENV
echo "SOURCE_ZIP_NAME=$(echo "source-${{ env.DIST_ARCHIVE_PREFIX_NAME }}-${{ env.PACKAGE_VERSION_NAME }}-${{env.BUILD_TIMESTAMP}}-${{ env.COMMIT_ID }}.zip")" >> $GITHUB_ENV
- name: Archive source code
uses: papeloto/action-zip@v1
with:
files: |
./
recursive: false
dest: ${{ env.SOURCE_ZIP_NAME }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: |
~/.cache/yarn
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn
- name: Build
working-directory: ./
run: |
yarn docs:build
# - name: Set archive name
# id: set_name
# run: |
# echo "DIST_ZIP_NAME=$(echo "${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION_NAME }}-${{env.BUILD_TIMESTAMP}}-${{ env.COMMIT_ID }}.zip")" >> $GITHUB_ENV
# echo "SOURCE_ZIP_NAME=$(echo "source-${{ env.DIST_ARCHIVE_PREFIX_NAME }}-${{ env.PACKAGE_VERSION_NAME }}-${{env.BUILD_TIMESTAMP}}-${{ env.COMMIT_ID }}.zip")" >> $GITHUB_ENV
# - name: Archive source code
# uses: papeloto/action-zip@v1
# with:
# files: |
# ./
# recursive: false
# dest: ${{ env.SOURCE_ZIP_NAME }}
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: 'https://registry.npmjs.org/'
# cache: 'yarn'
# - name: Restore yarn cache
# uses: actions/cache@v3
# with:
# path: |
# ~/.cache/yarn
# **/node_modules
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
# - name: Install dependencies
# run: yarn
# - name: Build
# working-directory: ./
# run: |
# yarn docs:build
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3.4.0
Expand All @@ -102,28 +102,28 @@ jobs:
with:
configuration: '.github/config/changelog_configuration.json'
ignorePreReleases: 'false'
- name: Deploy github page
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages
folder: docs/.vuepress/dist
- name: Archive dist
uses: papeloto/action-zip@v1
with:
files: |
docs/.vuepress/dist
recursive: false
dest: ${{ env.DIST_ZIP_NAME }}
# - name: Deploy github page
# uses: JamesIves/github-pages-deploy-action@v4.4.1
# with:
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# branch: gh-pages
# folder: docs/.vuepress/dist
# - name: Archive dist
# uses: papeloto/action-zip@v1
# with:
# files: |
# docs/.vuepress/dist
# recursive: false
# dest: ${{ env.DIST_ZIP_NAME }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: ${{steps.build_changelog.outputs.changelog}}
name: ${{ env.PACKAGE_VERSION_NAME }}
tag_name: ${{ env.TAG_NAME }}
files: |
${{ env.SOURCE_ZIP_NAME }}
${{ env.DIST_ZIP_NAME }}
# files: |
# ${{ env.SOURCE_ZIP_NAME }}
# ${{ env.DIST_ZIP_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}

Expand Down

1 comment on commit 4108d34

@vercel
Copy link

@vercel vercel bot commented on 4108d34 Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.