diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 9f62c60..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build -on: - pull_request: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Check out code repository source code - uses: actions/checkout@v3 - - - id: setup-node - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Install dependencies - run: npm ci - - - name: Run tests - run: npm run test - - - name: Run build - run: npm run build - - # Publishing is done in a separate job to allow - # for all matrix builds to complete. - BuildRelease: - needs: test - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - name: Checkout Code - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }} - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - - name: Build and Release - uses: jupiterone/action-npm-build-release@v1 - with: - npm_auth_token: ${{ secrets.NPM_AUTH_TOKEN }} - gh_token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }} diff --git a/.github/workflows/canary-release.yaml b/.github/workflows/canary-release.yaml new file mode 100644 index 0000000..37b33ea --- /dev/null +++ b/.github/workflows/canary-release.yaml @@ -0,0 +1,9 @@ +name: Canary Release +on: + issue_comment: + types: + - created +jobs: + canary-release: + uses: jupiterone/github-internal/.github/workflows/npm-canary-release.yaml@v1 + secrets: inherit diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..830c353 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,9 @@ +name: Backend PR + +on: + pull_request: + +jobs: + pr: + uses: jupiterone/github-internal/.github/workflows/npm-pr.yaml@v1 + secrets: inherit diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c97c237 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,9 @@ +name: NPM Release +on: + push: + branches: + - main +jobs: + release: + uses: jupiterone/github-internal/.github/workflows/npm-release.yaml@v1 + secrets: inherit diff --git a/package.json b/package.json index 7c072ad..4cd3828 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ ], "scripts": { "build": "unbuild", + "validate:ci":"npm run test", "test": "npm run test:types && mocha \"tests/**/*.tests.ts\"", "test:types": "tsc --noEmit --skipLibCheck", "lint:markdown": "prettier --write '*.md' '!(node_modules|dist)/**/*.md' && markdownlint '*.md' '!(node_modules|dist)/**/*.md' --config=.github/linters/.markdown-lint.yml --fix",