Skip to content

Commit 345aaec

Browse files
authored
Merge pull request #301 from Automattic/trunk
Alpha release Mar 05
2 parents 542194a + 781533b commit 345aaec

25 files changed

Lines changed: 429 additions & 200 deletions

.circleci/config.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Dependabot config.
2+
# Keep NPM and Composer packages up-to-date.
3+
4+
version: 2
5+
updates:
6+
# Enable version updates for npm
7+
- package-ecosystem: 'npm'
8+
# Look for `package.json` and `lock` files in the `root` directory
9+
directory: '/'
10+
# Check the npm registry for updates every day (weekdays)
11+
schedule:
12+
interval: 'weekly'
13+
# Add reviewers
14+
reviewers:
15+
- 'Automattic/newspack-product'
16+
17+
# Enable version updates for Composer
18+
- package-ecosystem: 'composer'
19+
# Look for a `composer.lock` in the `root` directory
20+
directory: '/'
21+
# Check for updates every day (weekdays)
22+
schedule:
23+
interval: 'weekly'
24+
# Add reviewers
25+
reviewers:
26+
- 'Automattic/newspack-product'

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
needs-changelog:
2-
- base-branch: ['trunk']
2+
- base-branch: ['trunk', 'release']

.github/workflows/auto-merge.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
pull_request_target:
3+
4+
name: Dependabot auto-merge
5+
jobs:
6+
auto-merge:
7+
name: Auto-merge dependabot PRs for minor and patch updates
8+
runs-on: ubuntu-latest
9+
if: github.actor == 'dependabot[bot]'
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
steps:
14+
- name: Fetch Dependabot metadata
15+
id: metadata
16+
uses: dependabot/fetch-metadata@v2
17+
with:
18+
github-token: "${{ secrets.GITHUB_TOKEN }}"
19+
20+
- name: Approve PR
21+
if: >-
22+
(contains(steps.metadata.outputs.update-type, 'version-update:semver-minor') ||
23+
contains(steps.metadata.outputs.update-type, 'version-update:semver-patch')) &&
24+
!contains(steps.metadata.outputs.update-type, 'version-update:semver-major')
25+
run: gh pr review --approve "$PR_URL"
26+
env:
27+
PR_URL: ${{ github.event.pull_request.html_url }}
28+
GH_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
29+
30+
- name: Enable auto-merge for minor and patch updates
31+
if: >-
32+
(contains(steps.metadata.outputs.update-type, 'version-update:semver-minor') ||
33+
contains(steps.metadata.outputs.update-type, 'version-update:semver-patch')) &&
34+
!contains(steps.metadata.outputs.update-type, 'version-update:semver-major')
35+
run: gh pr merge --auto --squash "$PR_URL"
36+
env:
37+
PR_URL: ${{ github.event.pull_request.html_url }}
38+
GH_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- trunk
8+
- release
9+
- alpha
10+
- 'hotfix/**'
11+
- 'epic/**'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
uses: Automattic/newspack-scripts/.github/workflows/reusable-build.yml@trunk
20+
21+
lint-js-scss:
22+
needs: build
23+
uses: Automattic/newspack-scripts/.github/workflows/reusable-lint-js-scss.yml@trunk
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build distributable
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
build-distributable:
12+
uses: Automattic/newspack-scripts/.github/workflows/reusable-build-distributable.yml@trunk
13+
with:
14+
archive-name: newspack-network

.github/workflows/changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
labeler:
8-
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'trunk' && github.event.pull_request.user.login != 'dependabot[bot]'
8+
if: github.event.pull_request.merged == true && (github.event.pull_request.base.ref == 'trunk' || github.event.pull_request.base.ref == 'release') && github.event.pull_request.user.login != 'dependabot[bot]'
99
permissions:
1010
contents: read
1111
pull-requests: write
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/labeler@v5
1515

1616
comment_pr:
17-
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'trunk' && github.event.pull_request.user.login != 'dependabot[bot]'
17+
if: github.event.pull_request.merged == true && (github.event.pull_request.base.ref == 'trunk' || github.event.pull_request.base.ref == 'release') && github.event.pull_request.user.login != 'dependabot[bot]'
1818
permissions:
1919
contents: read
2020
pull-requests: write

.github/workflows/i18n.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Internationalization
2+
3+
on:
4+
push:
5+
branches:
6+
- trunk
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
i18n:
14+
uses: Automattic/newspack-scripts/.github/workflows/reusable-i18n.yml@trunk
15+
secrets:
16+
GIT_COMMITTER_TOKEN: ${{ secrets.GIT_COMMITTER_TOKEN }}

.github/workflows/php.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: PHP
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- trunk
8+
- release
9+
- alpha
10+
- 'hotfix/**'
11+
- 'epic/**'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
lint-php:
19+
uses: Automattic/newspack-scripts/.github/workflows/reusable-lint-php.yml@trunk
20+
21+
test-php:
22+
uses: Automattic/newspack-scripts/.github/workflows/reusable-test-php.yml@trunk

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
- alpha
8+
- 'hotfix/**'
9+
- 'epic/**'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
uses: Automattic/newspack-scripts/.github/workflows/reusable-build.yml@trunk
18+
19+
release:
20+
needs: build
21+
uses: Automattic/newspack-scripts/.github/workflows/reusable-release.yml@trunk
22+
secrets:
23+
GIT_COMMITTER_TOKEN: ${{ secrets.GIT_COMMITTER_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
26+
post-release:
27+
if: github.ref == 'refs/heads/release'
28+
needs: release
29+
uses: Automattic/newspack-scripts/.github/workflows/reusable-post-release.yml@trunk
30+
secrets:
31+
GIT_COMMITTER_TOKEN: ${{ secrets.GIT_COMMITTER_TOKEN }}
32+
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
33+
SLACK_AUTH_TOKEN: ${{ secrets.SLACK_AUTH_TOKEN }}

0 commit comments

Comments
 (0)