Skip to content

Commit

Permalink
Update publish workflow & add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joduplessis committed Jan 31, 2024
1 parent f0ef5cf commit defeaed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches:
- '**'

jobs:
test_pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm install
- name: Build @fold-dev/design
run: npm --workspace @fold-dev/design run build:prod
- name: Build @fold-dev/core
run: npm --workspace @fold-dev/core run build:prod
- name: Run tests
run: npm test
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@ name: ci-tag-publish

on:
push:
tags:
- 'v*'
branches:
- '**'

jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# gets the current tag name
# The short ref name of the branch or tag that triggered the workflow run.
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# - name: Get tag from Git
# id: git_tag
# run: echo "$GITHUB_REF_NAME"

- name: Set up Node
uses: actions/setup-node@v3
with:
Expand All @@ -29,4 +22,4 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm install
npm run publish
npm run publish:dry-run

0 comments on commit defeaed

Please sign in to comment.