Skip to content

Merge pull request #53 from wszgrcy/ng17 #56

Merge pull request #53 from wszgrcy/ng17

Merge pull request #53 from wszgrcy/ng17 #56

Workflow file for this run

name: CI
on:
push:
branches:
- alpha
env:
REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: init
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@gmail.com"
- name: pull-code
uses: actions/checkout@v2
- name: install-node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: "npm"
- name: install-dependencies
run: |
npm ci --legacy-peer-deps
- name: lint
run: |
npm run lint
- name: hook-code
run: |
npm run sync
- name: test
run: |
npm run test:ci
- name: build
run: |
npm run build
- id: publish
name: publish
uses: JS-DevTools/npm-publish@v1
if: ${{ github.repository_owner == 'wszgrcy' }}
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
package: ./dist/package.json
tag: alpha
- if: ${{ github.repository_owner == 'wszgrcy' && steps.publish.outputs.type }}
run: |
echo "[${{ steps.publish.outputs.type }}]版本已变更: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
git tag v${{steps.publish.outputs.version}}
git push origin v${{steps.publish.outputs.version}}