Skip to content

Commit

Permalink
Merge pull request #199 from iterative/housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
yathomasi authored May 5, 2023
2 parents 7449d59 + 460a256 commit 4cae01b
Show file tree
Hide file tree
Showing 10 changed files with 2,261 additions and 1,104 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
name: Publish Package to npmjs
on:
release:
types: [created]
workflow_dispatch:
inputs:
version:
type: choice
description: 'Version to publish'
required: true
options: ['patch', 'minor', 'major', 'pre']
default: 'patch'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
scope: '@dvcorg'
cache: 'yarn'

- name: Install dependencies
run: |
yarn install --frozen-lockfile
- run: |
yarn release:ci ${{ github.event.inputs.version }}
cd ./packages/gatsby-theme-iterative
yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"git": {
"branch": "main",
"commitMessage": "chore: release v${version}"
},
"hooks": {
"before:init": [
"yarn format-check-all",
"yarn lint",
"yarn lint-css",
"yarn lint-ts"
]
},
"plugins": {
"@release-it-plugins/workspaces": {
"workspaces": ["packages/gatsby-theme-iterative"],
"publish": false,
"additionalManifests": {
"versionUpdates": []
}
}
},
"github": {
"release": true
},
"npm": false
}
3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
{
"ignoreFunctions": ["a", "color-mod"]
}
]
],
"media-feature-range-notation": null
}
}
22 changes: 14 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,31 @@
"serve": "yarn workspace example serve",
"develop": "yarn workspace example develop",
"get-commands": "yarn workspace @dvcorg/gatsby-theme-iterative get-commands",
"prepare": "husky install"
"prepare": "husky install",
"release": "release-it",
"release:pre": "release-it --preRelease=beta",
"release:ci": "release-it --ci",
"release:dry": "release-it --dry-run"
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.56.0",
"@typescript-eslint/parser": "5.56.0",
"eslint": "^8.34.0",
"@release-it-plugins/workspaces": "^3.2.0",
"@typescript-eslint/eslint-plugin": "5.59.1",
"@typescript-eslint/parser": "5.59.1",
"eslint": "8.39.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.32.2",
"gatsby-plugin-postcss": "^6.4.0",
"husky": "8.0.3",
"lint-staged": "13.2.0",
"prettier": "2.8.7",
"stylelint": "^15.1.0",
"stylelint-config-standard": "^31.0.0"
"lint-staged": "13.2.2",
"prettier": "2.8.8",
"release-it": "^15.10.1",
"stylelint": "15.6.0",
"stylelint-config-standard": "33.0.0"
}
}
1 change: 0 additions & 1 deletion packages/example/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const {
} = require('../gatsby-theme-iterative/package.json')

module.exports = {
trailingSlash: 'never',
siteMetadata: {
title: 'Example website',
description: 'Example website description',
Expand Down
2 changes: 1 addition & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"react-dom": "^18.0.0"
},
"devDependencies": {
"eslint": "8.36.0"
"eslint": "8.39.0"
}
}
3 changes: 2 additions & 1 deletion packages/gatsby-theme-iterative/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@ module.exports = ({
plausibleSrc,
plausibleAPI,
plausibleDomain
}
},
trailingSlash: 'never'
})
4 changes: 2 additions & 2 deletions packages/gatsby-theme-iterative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
},
"devDependencies": {
"@types/hast": "2.3.4",
"eslint": "8.36.0",
"typescript": "5.0.2"
"eslint": "8.39.0",
"typescript": "5.0.4"
},
"peerDependencies": {
"gatsby": "^5.0.0",
Expand Down
45 changes: 44 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", "group:allNonMajor"]
"extends": [
"config:base",
"group:linters",
"group:postcss",
"helpers:disableTypesNodeMajor",
":reviewer(team:websites)",
":enableVulnerabilityAlerts",
":label(dependencies)"
],
"prConcurrentLimit": 4,
"prHourlyLimit": 2,
"dependencyDashboardApproval": true,
"packageRules": [
{
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchPackagePatterns": ["*"],
"matchDatasources": ["npm"],
"stabilityDays": 7,
"matchUpdateTypes": ["minor", "patch"],
"automerge": true,
"automergeType": "branch",
"schedule": ["on tuesday every 2 weeks"],
"prPriority": 1,
"dependencyDashboardApproval": false
},
{
"matchPackagePatterns": ["*"],
"stabilityDays": 7,
"matchDatasources": ["npm"],
"schedule": ["on tuesday"],
"automerge": true,
"automergeType": "branch",
"dependencyDashboardApproval": false
},
{
"matchPackagePatterns": ["@dvcorg", "iterative"],
"additionalBranchPrefix": "iterative-package-",
"matchDatasources": ["npm"],
"prCreation": "immediate",
"prPriority": 2,
"dependencyDashboardApproval": false
}
]
}
Loading

0 comments on commit 4cae01b

Please sign in to comment.