Skip to content

Commit

Permalink
add covector
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda committed May 24, 2021
1 parent 74da8f2 commit 3e65bed
Show file tree
Hide file tree
Showing 13 changed files with 2,515 additions and 667 deletions.
5 changes: 5 additions & 0 deletions .changes/add-covector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gatsby-source-airtable": housekeeping
---

Initialize covector to perform versioning and publishing of `gatsby-source-airtable`.
13 changes: 13 additions & 0 deletions .changes/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"gitSiteUrl": "https://github.com/jbolda/gatsby-source-airtable/",
"additionalBumpTypes": ["housekeeping"],
"packages": {
"gatsby-source-airtable": {
"path": ".",
"manager": "javascript",
"version": true,
"getPublishedVersion": "npm view ${ pkg.pkg } version",
"publish": "npm publish --access public"
}
}
}
46 changes: 46 additions & 0 deletions .changes/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Changes

##### via https://github.com/jbolda/covector

As you create PRs and make changes that require a version bump, please add a new
markdown file in this folder. You do not note the version _number_, but rather
the type of bump that you expect: major, minor, or patch. The filename is not
important, as long as it is a `.md`, but we recommend that it represents the
overall change for organizational purposes.

When you select the version bump required, you do _not_ need to consider
dependencies. Only note the package with the actual change, and any packages
that depend on that package will be bumped automatically in the process.

Use the following format:

```md
---
"package-a": patch
"package-b": minor
---

Change summary goes here
```

Summaries do not have a specific character limit, but are text only. These
summaries are used within the (future implementation of) changelogs. They will
give context to the change and also point back to the original PR if more
details and context are needed.

Changes will be designated as a `major`, `minor` or `patch` as further described
in [semver](https://semver.org/).

Given a version number MAJOR.MINOR.PATCH, increment the:

- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions
to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra
steps will be necessary in consideration of merging and publishing).

Lastly, we always expect a change file to be included on a PR. If the code
change does not necessitate a version bump, you may add a change file designated
as `housekeeping`. It is primarily to include it in the changelog.
16 changes: 16 additions & 0 deletions .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: covector status
on: [pull_request]

jobs:
covector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for use of git history
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
command: "status"
44 changes: 44 additions & 0 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: version or publish

on:
push:
branches:
- main

jobs:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for use of git history
- uses: volta-cli/action@v1
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "version-or-publish"
createRelease: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: peter-evans/create-pull-request@v3
if: steps.covector.outputs.commandRan == 'version'
with:
title: "Publish New Versions"
commit-message: "publish new versions"
labels: "version updates"
branch: "release"
body: ${{ steps.covector.outputs.change }}
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run format
5 changes: 3 additions & 2 deletions examples/markdown-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"name": "markdown-docs-example",
"version": "0.0.0",
"private": true,
"dependencies": {
"gatsby": "2.24.69",
"gatsby-source-airtable": "2.1.1",
Expand All @@ -23,7 +25,6 @@
"prettier": "2.1.2"
},
"volta": {
"node": "14.17.0",
"npm": "7.13.0"
"extends": "../../package.json"
}
}
6 changes: 3 additions & 3 deletions examples/recipes-with-multi-type/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "gatsby-starter-default",
"description": "Gatsby default starter",
"version": "1.0.0",
"version": "0.0.0",
"private": true,
"repository": "git@github.com:jbolda/gatsby-source-airtable.git",
"author": "Jacob Bolda <me@jacobbolda.com>",
"dependencies": {
Expand Down Expand Up @@ -37,7 +38,6 @@
"prettier": "2.1.2"
},
"volta": {
"node": "14.17.0",
"npm": "7.13.0"
"extends": "../../package.json"
}
}
3 changes: 1 addition & 2 deletions examples/recipes-with-photos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"prettier": "2.1.2"
},
"volta": {
"node": "14.17.0",
"npm": "7.13.0"
"extends": "../../package.json"
}
}
5 changes: 3 additions & 2 deletions examples/testing-options/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"name": "testing-options",
"version": "0.0.0",
"private": true,
"dependencies": {
"gatsby": "2.24.69",
"gatsby-source-airtable": "2.1.1",
Expand All @@ -24,7 +26,6 @@
"prettier": "2.1.2"
},
"volta": {
"node": "14.17.0",
"npm": "7.13.0"
"extends": "../../package.json"
}
}

0 comments on commit 3e65bed

Please sign in to comment.