From f6d12372ea3f2c20fdf7e5df00b15990a199fdf3 Mon Sep 17 00:00:00 2001 From: Juan Date: Wed, 26 Apr 2023 23:01:36 -0300 Subject: [PATCH] Update workflow build --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/tests.yml | 33 --------------------------------- 2 files changed, 28 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3326169 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Build + +on: + push: + branches: [dev, main] + pull_request: + branches: [dev, main] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v3 + - name: Run tests - Node ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm install + - run: npm run test + if: endsWith(github.ref, 'main') + - uses: JS-DevTools/npm-publish@v2 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index d97da26..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,33 +0,0 @@ -# 🐙 Using node 16.x image, run jest unit tests in GitHub Actions. -# You can create your first workflow yml by https://github.com/[YOUR GIT NAME]/[YOUR REPO NAME]/actions/new -name: Build - -on: - push: - branches: [ dev, main ] - pull_request: - branches: [ dev, main ] - -jobs: - build: - - runs-on: ubuntu-latest - environment: TAILWIND_TUTO_PROD - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v3 - - name: Run tests - Node ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm install - - run: npm run test - # Publish to npmjs - if: endsWith(github.ref, 'main') - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file