Skip to content

Bump ejs from 3.1.5 to 3.1.10 in /test #121

Bump ejs from 3.1.5 to 3.1.10 in /test

Bump ejs from 3.1.5 to 3.1.10 in /test #121

Workflow file for this run

name: VisualTest(push)
on:
push:
branches:
- '**'
tags-ignore:
- 'devel.**'
- 'latest.**'
jobs:
release:
name: check version, add tag and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: main:Cache node modules(yarn.lock)
id: cache
uses: actions/cache@v1
with:
path: main/node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('main/yarn.lock') }}
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
- name: main:package-install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn --cwd main
- name: main:build
run: yarn --cwd main build
- name: test:Cache node modules(yarn.lock)
id: test-cache
uses: actions/cache@v1
with:
path: test/node_modules
key: ${{ runner.OS }}-build-test-${{ hashFiles('test/yarn.lock') }}
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
- name: test:package-install
if: steps.test-cache.outputs.cache-hit != 'true'
run: yarn --cwd test
- name: Create capture
run: yarn --cwd test capture
- name: Save capture
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
run: |
BRANCH=`echo $GITHUB_REF | sed 's/^refs\/heads\///'`
cd test/__screenshots__
git init
git remote add origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
git config --global user.name $GITHUB_ACTOR
git config --global user.email ${GITHUB_ACTOR}@git
git checkout -b captures/$BRANCH
git add .
git commit -m $BRANCH
git push -f origin captures/$BRANCH
- name: update npm package version
if: contains(github.ref, 'refs/tags')
uses: SoraKumo001/actions-npm-version-update@release
with:
path: main/package.json
- name: publish
if: contains(github.ref, 'refs/tags')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd main
a=($(echo $GITHUB_REF | sed -n -r 's/^refs\/tags\/([^-]*)-(.*)$/\1 \2/p')) tag=${a[0]} version=${a[1]}
echo publish $version [$tag]
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish --tag $tag