Skip to content

Commit

Permalink
Merge pull request #21 from ci7lus/chore/upgrade-ci
Browse files Browse the repository at this point in the history
⬆️ CI
  • Loading branch information
ci7lus authored May 12, 2023
2 parents ab0bdac + 1b57f6a commit cd2e8e1
Showing 1 changed file with 16 additions and 31 deletions.
47 changes: 16 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,25 @@ on:
type: boolean
required: true
default: true
description: "Is release?"

jobs:
lint:
runs-on: ubuntu-latest

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
Expand All @@ -55,7 +48,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

needs: lint

Expand All @@ -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
Expand All @@ -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/[email protected]
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 }}

0 comments on commit cd2e8e1

Please sign in to comment.