Skip to content

Commit

Permalink
Merge pull request #18 from beuluis/feature/use-reusable-workflows
Browse files Browse the repository at this point in the history
use reusable workflows
  • Loading branch information
beuluis committed Feb 14, 2023
2 parents ddbfaca + 746dc4f commit e32109d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 37 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/next-npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
push:
branches:
- main

jobs:
testing:
uses: ./.github/workflows/qa-check.yml

publish-npm:
needs: testing
uses: beuluis/reusable-workflows/.github/workflows/publish-npm.yml@main
with:
dist_tag: 'next'
secrets: inherit
19 changes: 2 additions & 17 deletions .github/workflows/prod-npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: Production publish package

on:
release:
types: [created]
Expand All @@ -10,18 +8,5 @@ jobs:

publish-npm:
needs: testing
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
uses: beuluis/reusable-workflows/.github/workflows/publish-npm.yml@main
secrets: inherit
21 changes: 1 addition & 20 deletions .github/workflows/qa-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: QA Checks

on:
workflow_dispatch:
workflow_call:
Expand All @@ -12,21 +10,4 @@ on:

jobs:
testing:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Test build
run: npm run build
- name: Run linter
run: npm run lint
- name: Run formatter
run: npm run format
- name: Run tests
run: npm test
uses: beuluis/reusable-workflows/.github/workflows/qa-node-testing.yml@main

0 comments on commit e32109d

Please sign in to comment.