diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 00000000..a8f40596 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -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 diff --git a/.github/workflows/ci-tag-publish.yaml b/.github/workflows/tag-publish.yaml similarity index 51% rename from .github/workflows/ci-tag-publish.yaml rename to .github/workflows/tag-publish.yaml index 7ff43f6d..4ed4076f 100644 --- a/.github/workflows/ci-tag-publish.yaml +++ b/.github/workflows/tag-publish.yaml @@ -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: @@ -29,4 +22,4 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | npm install - npm run publish + npm run publish:dry-run