diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100755 index c441d7f8a4..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: 2.1 - -orbs: - newspack: newspack/newspack@1.5.8 - -workflows: - version: 2 - all: - jobs: - - newspack/build - - newspack/i18n: - requires: - - newspack/build - filters: - branches: - only: - - trunk - - newspack/lint-js-scss: - requires: - - newspack/build - - newspack/test-js: - requires: - - newspack/build - - newspack/release: - requires: - - newspack/build - filters: - branches: - only: - - release - - alpha - - /^hotfix\/.*/ - - /^epic\/.*/ - - newspack/build-distributable: - requires: - - newspack/build - # Running this after release ensure the version number in files will be correct. - - newspack/release - archive-name: 'newspack-plugin' - - newspack/post-release: - requires: - - newspack/release - filters: - branches: - only: - - release - php: - jobs: - - newspack/lint-php - - newspack/test-php diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000000..ea8ac8e49d --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,27 @@ +name: Build and Test + +on: + pull_request: + push: + branches: + - trunk + - release + - alpha + - 'hotfix/**' + - 'epic/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + uses: Automattic/newspack-scripts/.github/workflows/reusable-build.yml + + lint-js-scss: + needs: build + uses: Automattic/newspack-scripts/.github/workflows/reusable-lint-js-scss.yml + + test-js: + needs: build + uses: Automattic/newspack-scripts/.github/workflows/reusable-test-js.yml diff --git a/.github/workflows/build-distributable.yml b/.github/workflows/build-distributable.yml new file mode 100644 index 0000000000..fec6e2ee8c --- /dev/null +++ b/.github/workflows/build-distributable.yml @@ -0,0 +1,14 @@ +name: Build distributable + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-distributable: + uses: Automattic/newspack-scripts/.github/workflows/reusable-build-distributable.yml + with: + archive-name: newspack-plugin diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml new file mode 100644 index 0000000000..b031c5e29b --- /dev/null +++ b/.github/workflows/i18n.yml @@ -0,0 +1,14 @@ +name: Internationalization + +on: + push: + branches: + - trunk + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + i18n: + uses: Automattic/newspack-scripts/.github/workflows/reusable-i18n.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000000..2f30659fd8 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,22 @@ +name: PHP + +on: + pull_request: + push: + branches: + - trunk + - release + - alpha + - 'hotfix/**' + - 'epic/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint-php: + uses: Automattic/newspack-scripts/.github/workflows/reusable-lint-php.yml + + test-php: + uses: Automattic/newspack-scripts/.github/workflows/reusable-test-php.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..0e7743593f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + branches: + - release + - alpha + - 'hotfix/**' + - 'epic/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + uses: Automattic/newspack-scripts/.github/workflows/reusable-build.yml + + release: + needs: build + uses: Automattic/newspack-scripts/.github/workflows/reusable-release.yml + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + post-release: + if: github.ref == 'refs/heads/release' + needs: release + uses: Automattic/newspack-scripts/.github/workflows/reusable-post-release.yml diff --git a/package-lock.json b/package-lock.json index e9daf34606..ce63ab0223 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21872,8 +21872,8 @@ }, "node_modules/newspack-scripts": { "version": "5.8.0", - "resolved": "https://registry.npmjs.org/newspack-scripts/-/newspack-scripts-5.8.0.tgz", - "integrity": "sha512-INOymPHxavzLFziqa9zcfB9KRfi9w+FOwq1cNj8IKnfBSlWrYMLsw43LMgAk7wrGtv6crvHEREweHhPGWMAtGQ==", + "resolved": "git+ssh://git@github.com/Automattic/newspack-scripts.git#1b654fae0446656ac8221ae7400a42bbd80b2140", + "integrity": "sha512-NzUACVvKJJLiYXtFIHmxZNzVsqmYJmW0HuzUpNa3Y/pJEUK1QfqWk+SCACTyDx7zXoNlIvjBTbNUD6R1zSF72w==", "dev": true, "license": "ISC", "dependencies": {