Skip to content

Commit

Permalink
ci(workflows): make sure needs are met
Browse files Browse the repository at this point in the history
  • Loading branch information
ducktordanny committed Jun 16, 2024
1 parent 7b86c03 commit de0c7a0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/tests-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# On master pushes it runs the rule tests and if needed it publishes to NPM (new package.json version).

name: Tests & Release
name: Master Workflow
on:
push:
branches: master

jobs:
publish:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -29,6 +30,25 @@ jobs:
- name: Rule tests
run: yarn test

release:
name: Release
needs: checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Runs rule tests on PRs targeting the master.

name: Tests
name: PR Workflow
on:
pull_request:
branches: master
Expand Down

0 comments on commit de0c7a0

Please sign in to comment.