Skip to content

build plugin

build plugin #590

Workflow file for this run

name: build plugin
on:
workflow_dispatch:
push:
branches:
- master
- main
paths-ignore:
- 'test/**'
- '.run/**'
- '.github/**'
- 'docs/**'
- 'coverage/**'
- 'test/**'
- '*.*'
- '.*'
schedule:
## https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
## ┌───────────── minute (0 - 59)
## │ ┌───────────── hour (0 - 23)
## │ │ ┌───────────── day of the month (1 - 31)
## │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
## │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
## │ │ │ │ │
## │ │ │ │ │
## │ │ │ │ │
## * * * * *
# - cron: '* * 1 * *'
- cron: '* 12 * * 3'
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@master
with:
fetch-depth: 20
- uses: actions/setup-node@master
with:
node-version: 20
- name: get yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: set cache id
id: id-cache
run: echo "::set-output name=id::${GITHUB_SHA}"
- name: echo var
run: |
echo ${{ steps.yarn-cache.outputs.dir }}
echo ${{ steps.id-cache.outputs.id }}
echo ${GITHUB_SHA}
- name: yarn cache
uses: bluelovers/github-actions-cache@2020011001
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ steps.id-cache.outputs.id }}
restore-keys: |
${{ runner.os }}-yarn-
- name: setup git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local core.autocrlf false
git config --local core.ignorecase false
git config --local include.path ../.gitconfig
git config --local core.autocrlf false
git config --local core.ignorecase false
- name: Fetch git tags
run: |
git fetch origin 'refs/tags/*:refs/tags/*' --depth=20
- name: install deps
run: |
yarn config set ignore-engines true
yarn install --frozen-lockfile
yarn run ci:install
- name: run ci:build
if: success()
# env:
run: |
yarn run ci:build
- name: run ci:postpublish
if: success()
# env:
run: |
yarn run ci:postpublish
- name: Push changes
if: success()
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Push Tag
if: success()
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
force: true