From c35b61573f9d1e68418fe1799c2ed4594d2204c6 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 23 Oct 2019 11:58:41 +0200 Subject: [PATCH] Update workflows (#21) * Failed if uncommited changes * Fix virtual env * Fix lint workflow * Display changes --- .github/workflows/lint.yml | 11 +++++++---- .github/workflows/release.yml | 7 ++++++- .github/workflows/uncommited.yml | 6 ++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ab4ad09..72da253 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,19 +2,22 @@ name: lint on: pull_request: - branches: - - master - - releases/* paths: - - src/* + - '.github/workflows/lint.yml' + - 'src/*' jobs: lint: runs-on: ubuntu-latest steps: - + # https://github.com/actions/checkout name: Checkout uses: actions/checkout@v1 + - + # https://github.com/actions/setup-node + name: Set up Node + uses: actions/setup-node@v1 - name: Setup TS run: npm install tslint typescript -g diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0ed2fc..15bf4a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,9 +9,10 @@ on: jobs: release: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - + # https://github.com/actions/checkout name: Checkout uses: actions/checkout@v1 - @@ -40,6 +41,10 @@ jobs: if [ -n "${{ steps.prepare.outputs.major_exists }}" ]; then git branch --set-upstream-to=origin/releases/${{ steps.prepare.outputs.major_tag }} releases/${{ steps.prepare.outputs.major_tag }} fi + - + # https://github.com/actions/setup-node + name: Set up Node + uses: actions/setup-node@v1 - name: NPM production deps run: | diff --git a/.github/workflows/uncommited.yml b/.github/workflows/uncommited.yml index 14d4e34..0434ebb 100644 --- a/.github/workflows/uncommited.yml +++ b/.github/workflows/uncommited.yml @@ -12,6 +12,10 @@ jobs: # https://github.com/actions/checkout name: Checkout uses: actions/checkout@v1 + - + # https://github.com/actions/setup-node + name: Set up Node + uses: actions/setup-node@v1 - name: Build run: | @@ -23,5 +27,7 @@ jobs: name: Check for uncommitted changes run: | if [[ `git status --porcelain` ]]; then + git status --porcelain echo "##[error] found changed files after build. please 'npm run build && npm run format && npm prune --production'" + exit 1 fi