Skip to content

Commit

Permalink
Merge pull request #12 from Automattic/alpha
Browse files Browse the repository at this point in the history
Release May 03
  • Loading branch information
dkoo authored May 3, 2023
2 parents 8ee9459 + ecb4bca commit 51a1034
Show file tree
Hide file tree
Showing 36 changed files with 60,948 additions and 83 deletions.
84 changes: 84 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: 2.1

commands:
checkout_code:
steps:
- checkout
- attach_workspace:
at: ~/

jobs:
build:
docker:
- image: cimg/node:16.11.1
steps:
- checkout_code
- run:
name: Install dependencies
command: npm ci
- persist_to_workspace:
root: ~/
paths:
- project

# Linting
lint:
docker:
- image: cimg/node:16.11.1
steps:
- checkout_code
- run:
name: Run Linter
command: npm run lint

# Release job
release:
docker:
- image: cimg/node:16.11.1
steps:
- checkout_code
- run:
name: Install rsync
command: sudo apt-get update && sudo apt-get install rsync
- run:
name: Release new version
command: npm run release
- persist_to_workspace:
root: ~/
paths:
- project

# Reset alpha branch after a release and publish child themes' releases
post_release:
docker:
- image: cimg/node:16.11.1
steps:
- checkout_code
- run:
name: Perform post-release chores
command: ./node_modules/newspack-scripts/post-release.sh

workflows:
version: 2
main:
jobs:
- build
- lint:
requires:
- build
- release:
requires:
- build
filters:
branches:
only:
- release
- alpha
- /^hotfix\/.*/
- post_release:
requires:
- release
filters:
branches:
only:
- release
49 changes: 49 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# A set of files you probably don't want in your WordPress.org distribution
.babelrc
.editorconfig
.*ignore
.*rc*
*.config.js
.git
.gitlab-ci.yml
.travis.yml
.DS_Store
Thumbs.db
behat.yml
bitbucket-pipelines.yml
composer.json
composer.lock
dependencies.yml
package.json
package-lock.json
phpunit.xml
phpunit.xml.dist
multisite.xml
multisite.xml.dist
.phpcs.xml
phpcs.xml
.phpcs.xml.dist
phpcs.xml.dist
README.md
PULL_REQUEST_TEMPLATE.md
webpack.config.js
wp-cli.local.yml
yarn.lock
*.sql
*.tar.gz
*.zip
*.asset.php

# directories
node_modules
.cache
.git
.github
.circleci
/tests
/bin
/src
/release
.cache
codecov
__mocks__
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4

[{.jshintrc,*.json,*.yml}]
indent_style = space
indent_size = 2

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require( '@rushstack/eslint-patch/modern-module-resolution' );

module.exports = {
extends: [ './node_modules/newspack-scripts/config/eslintrc.js' ],
globals: {
newspack_urls: 'readonly',
newspack_aux_data: 'readonly',
},
rules: {
'no-console': 'off',
},
ignorePatterns: [ 'dist/', 'node_modules/', 'assets/components/node_modules' ],
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Automattic/newspack-product
37 changes: 37 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Dependabot config.
# Keep NPM and Composer packages up-to-date.

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'weekly'
# Add reviewers
reviewers:
- 'Automattic/newspack-product'

# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `assets/components` directory
directory: '/assets/components'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'weekly'
# Add reviewers
reviewers:
- 'Automattic/newspack-product'

# Enable version updates for Composer
- package-ecosystem: 'composer'
# Look for a `composer.lock` in the `root` directory
directory: '/'
# Check for updates every day (weekdays)
schedule:
interval: 'weekly'
# Add reviewers
reviewers:
- 'Automattic/newspack-product'
18 changes: 18 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
pull_request_target:
types: [labeled]

name: Dependabot auto-merge
jobs:
auto-merge:
name: Auto-merge dependabot PRs for minor and patch updates
runs-on: ubuntu-latest
if: |
contains( github.event.pull_request.labels.*.name, 'dependencies' )
&& ! contains( github.event.pull_request.labels.*.name, '[Status] Approved' )
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor # includes patch updates.
github-token: ${{ secrets.DEPENDABOT_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on: pull_request_review
name: Label approved pull requests
jobs:
labelWhenApproved:
name: Label when approved
runs-on: ubuntu-latest
steps:
- name: Label when approved
uses: pullreminders/label-when-approved-action@master
env:
APPROVALS: '1'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: '[Status] Approved'
# Needs to be URL-encoded, see https://github.com/abinoda/label-when-approved-action/pull/3#discussion_r321882620
REMOVE_LABEL: '%5BStatus%5D%20Needs%20Review'
15 changes: 14 additions & 1 deletion gitignore → .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ project.properties
*.sublime-workspace
.sublimelinterrc

# Composer
/vendor/

# NPM
/node_modules/
.cache

# OS X metadata
.DS_Store

# Windows junk
Thumbs.db

# Compiled CSS
*.css

# Compiled Javascript
/dist/
*.asset.php

# Release folder
release/
/release/
8 changes: 8 additions & 0 deletions .hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')

if [[ "$branch" = "master" ]]; then
echo "Error: pushing directly to the master branch is prohibited"
exit 1
fi
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.11.1
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
useTabs: true
tabWidth: 2
printWidth: 100
singleQuote: true
trailingComma: es5
bracketSpacing: true
parenSpacing: true
jsxBracketSameLine: false
semi: true
arrowParens: avoid
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# [1.0.0-alpha.5](https://github.com/Automattic/newspack-block-theme/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2023-05-03)


### Bug Fixes

* try semantic-release directly ([fa2a979](https://github.com/Automattic/newspack-block-theme/commit/fa2a979bd3527dcb71a33298c3ef691074561704))

# [1.0.0-alpha.4](https://github.com/Automattic/newspack-block-theme/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2023-04-19)


### Bug Fixes

* one more try ([916b1d2](https://github.com/Automattic/newspack-block-theme/commit/916b1d2e8dfccbe3a1e4413acb4f849dbaa85f5e))

# [1.0.0-alpha.3](https://github.com/Automattic/newspack-block-theme/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2023-04-19)


### Bug Fixes

* config.yml for CI ([7b2d2ba](https://github.com/Automattic/newspack-block-theme/commit/7b2d2bafd284911c6e3d5a70632834b5ae1f3316))
* config.yml for CI ([48559ee](https://github.com/Automattic/newspack-block-theme/commit/48559ee42358722c6cfd52776ba7573827d48057))
* config.yml for CI ([99c9555](https://github.com/Automattic/newspack-block-theme/commit/99c95555c70411c66a2540431c7e8a935e8b093b))
* config.yml for CI ([8bc9f9d](https://github.com/Automattic/newspack-block-theme/commit/8bc9f9dbaec8c66a07b508279fb76fd202dc3dbe))
* config.yml for CI ([fe5421b](https://github.com/Automattic/newspack-block-theme/commit/fe5421b723e11859344723374699de0c34c4e2f4))
* config.yml for CI ([7e27a3c](https://github.com/Automattic/newspack-block-theme/commit/7e27a3c6edb49c24d44739a53e9706dca4a7ca77))
* config.yml for CI ([f1a5bc5](https://github.com/Automattic/newspack-block-theme/commit/f1a5bc5120193aa05e483dd745d7c1241b56a7ff))
* try alternate release job for additional version bump assets ([6035f48](https://github.com/Automattic/newspack-block-theme/commit/6035f48c2067095cfecd02f34cd20f450fd48e31))

# [1.0.0-alpha.2](https://github.com/Automattic/newspack-block-theme/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2023-04-19)


### Bug Fixes

* version bump in additional files ([8616144](https://github.com/Automattic/newspack-block-theme/commit/8616144c06da05f1e372838f8d67bca9d2c3ddc2))

# 1.0.0-alpha.1 (2023-04-19)


### Bug Fixes

* remove unnecessary jobs from CI config ([#5](https://github.com/Automattic/newspack-block-theme/issues/5)) ([a50f7bc](https://github.com/Automattic/newspack-block-theme/commit/a50f7bc6e2cbed7a0d8cb87db7db2cc33dc97e98))


### Features

* fork Block Canvas v. 0.0.26 as a theme starting point ([4cffa9f](https://github.com/Automattic/newspack-block-theme/commit/4cffa9fa53e4a8f4bbfab984363fb792ecc765d4))
* fork Block Canvas v. 0.0.26 as a theme starting point ([e5635a0](https://github.com/Automattic/newspack-block-theme/commit/e5635a0d86f2c3ca2818b36191c406532ceb65e1))
* setup repo ([#4](https://github.com/Automattic/newspack-block-theme/issues/4)) ([7d7b908](https://github.com/Automattic/newspack-block-theme/commit/7d7b908e026794944e5ec5437f36e98a14daf521))
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = api => {
api.cache( true );
return {
extends: 'newspack-scripts/config/babel.config.js',
};
};
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: [ './node_modules/newspack-scripts/config/commitlint.config.js' ] };
Loading

0 comments on commit 51a1034

Please sign in to comment.