From 1b57f6a6489148b0dd2b4811c3d3a8f1718cc96a Mon Sep 17 00:00:00 2001 From: ci7lus <7887955+ci7lus@users.noreply.github.com> Date: Sat, 13 May 2023 03:02:43 +0900 Subject: [PATCH] :arrow_up: CI --- .github/workflows/ci.yml | 47 ++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57cb83e..d371aca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ on: type: boolean required: true default: true + description: "Is release?" jobs: lint: @@ -24,25 +25,17 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: 'yarn' - name: Install run: | yarn @@ -55,7 +48,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] needs: lint @@ -64,22 +57,14 @@ jobs: GDRIVE_CLIENT_SECRET: ${{ secrets.GDRIVE_CLIENT_SECRET }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: 'yarn' - name: Install run: | yarn @@ -89,23 +74,23 @@ jobs: env: NODE_OPTIONS: "--max-old-space-size=4096" - name: Upload dist - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: dist path: dist - - name: Get Time + - name: Get current time if: ${{ github.event.inputs.release }} + uses: josStorer/get-current-time@v2 id: time - uses: nanzm/get-time-action@v1.1 with: - timeZone: 9 - format: "YYYYMMDDHHmm" + format: 'YYYYMMDDHHmm' + utcOffset: "+09:00" - name: Release if: ${{ github.event.inputs.release && github.ref == 'refs/heads/master' }} uses: softprops/action-gh-release@v1 with: files: dist/*.plugin.* - name: ${{ steps.time.outputs.time }} - tag_name: ${{ steps.time.outputs.time }} + name: ${{ steps.time.outputs.formattedTime }} + tag_name: ${{ steps.time.outputs.formattedTime }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}