This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converts project to TypeScript and publishes to GPR using GitHub Action
- Loading branch information
Ian Davies
committed
Oct 19, 2020
1 parent
46f5828
commit abe22e7
Showing
43 changed files
with
5,241 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: GPR Publish | ||
on: [ push ] | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v2 | ||
- | ||
name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org/ | ||
- | ||
run: npm install -g yarn | ||
- | ||
run: yarn install --frozen-lockfile | ||
- | ||
run: yarn run build | ||
- | ||
run: yarn run semantic-release -- --dry-run | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
run: yarn run semantic-release | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Mac | ||
.DS_STORE | ||
|
||
# Node | ||
node_modules/ | ||
dist/ | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# The following files are never ignored | ||
# http://npm.github.io/publishing-pkgs-docs/publishing/the-npmignore-file.html | ||
# package.json | ||
# README | ||
# CHANGELOG | ||
# LICENSE | ||
/* | ||
!/dist/* |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @FormidableLabs/formidable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019-2020 Formidable Labs. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,56 @@ | ||
# dogs | ||
Formidable Dogs | ||
|
||
## Contributing | ||
This repository is configured using [semantic-release](https://github.com/semantic-release/semantic-release) which automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package. | ||
|
||
What does this mean for contributors? Your commit messages will be linted using [commitlint](https://github.com/conventional-changelog/commitlint) and must adhere to the [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/). | ||
|
||
There are very precise rules over how git commit messages can be formatted. This leads to **more | ||
readable messages** that are easy to follow when looking through the **project history**. Also, | ||
the git commit messages are used to **generate the AngularJS change log**. | ||
|
||
### Anatomy of a commit | ||
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special | ||
format that includes a **type**, a **scope** and a **subject**: | ||
|
||
``` | ||
<type>(<scope>): <subject> | ||
<BLANK LINE> | ||
<body> | ||
<BLANK LINE> | ||
<footer> | ||
``` | ||
|
||
The **header** is mandatory and the **scope** of the header is optional. | ||
|
||
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier | ||
to read on GitHub as well as in various git tools. | ||
|
||
### What type of commits trigger a release? | ||
Type must be one of `[build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]`. | ||
- The types `build|ci|revert` are [undocumented](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type) but exist in [code](https://github.com/conventional-changelog/commitlint/blob/5fd27fdcd2d88435257f888d832fc19c5bbc037f/%40commitlint/config-conventional/index.test.js#L39). | ||
|
||
| Commit Types | Description | Version Impact | | ||
|--------------|-----------------------------------------------------|----------------| | ||
| `chore` | Changes to the build process | N/A | | ||
| `docs` | Changes to documentation | N/A | | ||
| `feat` | Changes that support a new feature | Patch | | ||
| `fix` | Changes that fix a bug | Minor | | ||
| `perf` | Changes that improve performance | Patch | | ||
| `refactor` | Changes that neither fixes a bug nor adds a feature | N/A | | ||
| `style` | Changes that do not affect the meaning of code | N/A | | ||
| `test` | Changes to the test process | N/A | | ||
|
||
### What about major version bumps? | ||
Major version bumps are considered **breaking changes** for `semantic-release` and are triggered intentionally. The footer should contain any information about major changes breaking changes and is also the place to reference GitHub issues that this commit closes. | ||
|
||
**Breaking changes** should start with the word `BREAKING CHANGE:` with two newlines. The rest of the commit message is then used for this. | ||
|
||
#### Example | ||
``` | ||
perf: removed pictures from published package | ||
BREAKING CHANGE: The dog .jpg files have been removed from the package. | ||
This decreases the package size from megabytes to kilobytes. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,50 @@ | ||
{ | ||
"name": "dogs", | ||
"name": "@formidablelabs/dogs", | ||
"version": "1.0.0", | ||
"description": "Formidable dogs", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"description": "Formidable Dogs", | ||
"author": "@FormidableLabs", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/FormidableLabs/dogs.git" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/FormidableLabs/dogs/issues" | ||
"publishConfig": { | ||
"registry": "https://npm.pkg.github.com" | ||
}, | ||
"scripts": { | ||
"build": "rimraf dist/ && tsc" | ||
}, | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@semantic-release/git": "^9.0.0", | ||
"husky": "^4.3.0", | ||
"rimraf": "^3.0.2", | ||
"semantic-release": "^17.2.1", | ||
"typescript": "^4.0.3" | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"homepage": "https://github.com/FormidableLabs/dogs#readme" | ||
"release": { | ||
"branches": [ | ||
"main" | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
"@semantic-release/git" | ||
] | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.