action-gh-release/.github/workflows/main.yml

46 lines
1.6 KiB
YAML
Raw Normal View History

2019-08-25 06:13:05 +00:00
name: Main
2019-09-09 08:10:07 +00:00
on: [pull_request, push]
# push:
# branches:
# - 'master'
2019-08-25 06:13:05 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
2019-09-09 08:10:07 +00:00
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Test
2019-09-09 08:11:42 +00:00
run: npm run test
2019-09-09 08:10:07 +00:00
- name: "check for uncommitted changes"
# Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
run: |
git diff --exit-code --stat -- . ':!node_modules' \
|| (echo "##[error] found changed files after build. please 'npm run build && npm run format'" \
"and check in all changes" \
&& exit 1)
2019-08-25 06:13:05 +00:00
# https://github.com/actions/docker/tree/master/cli
2019-09-09 08:10:07 +00:00
# - name: Package
# uses: actions/docker/cli@master
# with:
# args: build -t ${{ github.repository }}:latest -t ${{ github.repository }}:${{ github.sha }} .
# # https://github.com/actions/docker/tree/master/login
# - name: Publish Auth
# uses: actions/docker/login@master
# env:
# # https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# # https://github.com/actions/docker/tree/master/cli
# - name: Publish
# uses: actions/docker/cli@master
# with:
# args: push ${{ github.repository }}:latest