Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(launch): create first release #1

Merged
merged 2 commits into from
Jan 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
---

## Description

<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->

## Possible Fix

<!--- Not obligatory, but suggest a fix or reason for the bug -->

## Checklist

- [ ] I have read the [**contributing**](https://github.com/ifiokjr/gatsby-plugin-next-seo/blob/master/CONTRIBUTING.md) document.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
---

## Checklist

- [ ] I have read the [**contributing**](https://github.com/ifiokjr/gatsby-plugin-next-seo/blob/master/CONTRIBUTING.md) document.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
---

## Description

<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Implementation

<!--- Not obligatory, but suggest an idea for implementing addition or change -->

## Checklist

- [ ] I have read the [**contributing**](https://github.com/ifiokjr/gatsby-plugin-next-seo/blob/master/CONTRIBUTING.md) document.
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Description

<!-- Describe your changes in detail and reference any issues it addresses-->

## Checklist

<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->

- [ ] I have read the [**contributing**](https://github.com/ifiokjr/gatsby-plugin-next-seo/blob/master/CONTRIBUTING.md) document.
- [ ] My code follows the code style of this project and `yarn fix` runs successfully.
- [ ] I have updated the documentation where necessary.
- [ ] New code is unit tested and all current tests pass when running `yarn test && yarn test:e2e` .
38 changes: 34 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Node CI

on: [push]

env:
CI: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -12,14 +15,16 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
- name: setup node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# - name: audit dependencies
# run: yarn audit
- name: audit dependencies
run: yarn audit
- name: install dependencies
run: yarn --pure-lockfile
# - name: check yarn.lock is up to date
# run: yarn integrity
- name: lint files
run: yarn lint
- name: typecheck project
Expand All @@ -30,5 +35,30 @@ jobs:
run: yarn build
- name: run integration tests
run: yarn test:e2e
- name: upload build artifact
uses: actions/upload-artifact@v1
with:
name: build
path: lib/

release:
needs: [build]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: setup node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: install dependencies
run: yarn --pure-lockfile
- name: download build artifact
uses: actions/download-artifact@v1
with:
name: build
- name: release with semantic release
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
118 changes: 117 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,120 @@ package-lock.json
lib
notes.md

package.tar.gz
package.tar.gz

# =========================
# Node.js-Specific Ignores
# =========================

# Build directory
public/

# Gatsby cache
.cache/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
'<rootDir>/node_modules/',
'<rootDir>/cypress/',
'<rootDir>/e2e/',
'<rootDir>/example/',
'<rootDir>/lib/',
],
testEnvironment: 'jsdom',
Expand Down
37 changes: 31 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bugs": {
"url": "https://github.com/ifiokjr/gatsby-plugin-next-seo/issues"
},
"version": "1.0.0",
"version": "0.0.0-development",
"main": "lib/index.js",
"files": [
"gatsby-browser.js",
Expand All @@ -20,13 +20,15 @@
"src"
],
"scripts": {
"prebuild": "rimraf ./lib",
"build": "yarn build:types && yarn build:ts",
"audit": "yarn audit",
"build": "run-s clean:build build:types build:ts",
"build:test": "npm-run-all --sequential build e2e:build",
"build:ts": "babel src --out-dir lib --extensions \".ts,.tsx\"",
"build:types": "tsc --emitDeclarationOnly -p ./tsconfig.prod.json --declarationMap",
"build:watch": "yarn build:types -- --watch && yarn build:ts -- --watch",
"checks": "run-s lint typecheck test",
"checks": "run-s audit integrity lint typecheck test",
"clean:all": "git clean -fdX",
"clean:build": "git clean -fdX example lib",
"e2e:build": "run-s example:clean example:pack example:install example:build",
"e2e:start": "cd example && yarn gatsby serve",
"example:build": "cd example && yarn build --verbose",
Expand All @@ -35,9 +37,11 @@
"example:pack": "yarn pack --filename package.tar.gz",
"fix": "eslint --fix --ext=.tsx,.ts,.js .",
"format": "prettier --write \"{,!(node_modules|public|coverage|.cache)/**/}*.{js,jsx,ts,tsx,json}\"",
"integrity": "yarn check --integrity",
"is-logged-in": "npm whoami",
"lint": "eslint -f friendly --ext=.tsx,.ts,.js .",
"prepublishOnly": "run-s is-logged-in checks build",
"semantic-release": "semantic-release",
"table-of-contents": "doctoc README.md && prettier --write README.md",
"test": "jest",
"pretest:e2e": "yarn e2e:build",
Expand Down Expand Up @@ -71,6 +75,8 @@
"@babel/preset-react": "^7.7.4",
"@babel/preset-typescript": "^7.7.7",
"@cypress/schema-tools": "^4.7.1",
"@semantic-release/changelog": "^3.0.6",
"@semantic-release/git": "^7.0.18",
"@testing-library/react": "^9.4.0",
"@types/expect-puppeteer": "^3.3.3",
"@types/jest": "^24.0.25",
Expand Down Expand Up @@ -117,8 +123,8 @@
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-helmet-async": "^1.0.4",
"release": "^6.1.0",
"rimraf": "^2.6.3",
"semantic-release": "^15.14.0",
"signal-exit": "^3.0.2",
"typescript": "^3.7.4"
},
Expand All @@ -130,7 +136,8 @@
],
"husky": {
"hooks": {
"pre-commit": "yarn table-of-contents && git add README.md && lint-staged"
"pre-commit": "yarn table-of-contents && git add README.md && lint-staged",
"pre-push": "yarn checks"
}
},
"lint-staged": {
Expand Down Expand Up @@ -172,6 +179,24 @@
}
]
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"package.json",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
},
"resolutions": {
"jsdom": "^15.2.1"
}
Expand Down
Loading