diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index c32c248..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,47 +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/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-network' - - 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 0000000..375b63c --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,23 @@ +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@trunk + + lint-js-scss: + needs: build + uses: Automattic/newspack-scripts/.github/workflows/reusable-lint-js-scss.yml@trunk diff --git a/.github/workflows/build-distributable.yml b/.github/workflows/build-distributable.yml new file mode 100644 index 0000000..971f288 --- /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@trunk + with: + archive-name: newspack-network diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml new file mode 100644 index 0000000..b1c45ab --- /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@trunk diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..fd36b56 --- /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@trunk + + test-php: + uses: Automattic/newspack-scripts/.github/workflows/reusable-test-php.yml@trunk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c3e7f0c --- /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@trunk + + release: + needs: build + uses: Automattic/newspack-scripts/.github/workflows/reusable-release.yml@trunk + 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@trunk