Skip to content

Commit

Permalink
Merge pull request #42 from lifeomic/adopt-semantic-release
Browse files Browse the repository at this point in the history
chore: NO-TICKET - adopt semantic release, remove travisCI and other …
  • Loading branch information
austin-rausch authored Oct 19, 2021
2 parents abe50b0 + ca123a7 commit c408c55
Show file tree
Hide file tree
Showing 16 changed files with 3,131 additions and 213 deletions.
1 change: 1 addition & 0 deletions .github/lifeomic-probot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enforceSemanticCommits: false
18 changes: 18 additions & 0 deletions .github/workflows/pr-branch-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR Branch Build and Test

on: pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Build and Test
run: |
yarn
yarn lint
yarn test
yarn build
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Lint, test, and build
run: |
yarn
yarn lint
yarn test
yarn build
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{secrets.LIFEOMIC_NPM_TOKEN}}
run: |
npx semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ build/Release
node_modules/

work/

dist/
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

## How can I contribute?

If you're interested in contributing, we encourage you to submit a pull request!

Make sure at least one commit in your pull request matches [the conventional commits spec](https://www.conventionalcommits.org/en/v1.0.0/), so that your change
can be versioned correctly.

## Releases

This project releases using [`semantic-release`](https://github.com/semantic-release/semantic-release). Merged PRs are released immediately based on commit messages matching [the conventional commits spec](https://www.conventionalcommits.org/en/v1.0.0/).
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@lifeomic/attempt",
"version": "3.0.1",
"version": "0.0.0",
"description": "Library that can be used to retry functions that return promise",
"main": "./work/dist/src/",
"module": "./work/dist/es6/src/",
"jsnext:main": "./work/dist/esnext/src/",
"types": "./work/dist/src/index.d.ts",
"main": "./dist/src/",
"module": "./dist/es6/src/",
"jsnext:main": "./dist/esnext/src/",
"types": "./dist/src/index.d.ts",
"files": ["dist/*"],
"scripts": {
"compile-src-cjs": "tsc --declaration --declarationDir ./work/dist -p tsconfig-src-cjs.json",
"compile-src-cjs": "tsc --declaration --declarationDir ./dist -p tsconfig-src-cjs.json",
"compile-src-es6": "tsc -p tsconfig-src-es6.json",
"compile-src-esnext": "tsc -p tsconfig-src-esnext.json",
"precompile-src": "rm -rf ./work/dist",
Expand All @@ -18,12 +19,12 @@
"lint": "tslint --format codeFrame --project tsconfig.json 'src/**/*.ts' 'test/**/*.ts'",
"pretest": "yarn lint && yarn compile-test",
"test": "BABEL_ENV=test nyc ava 'work/dist-test/test/**/*.test.js'",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"prebuild": "yarn test",
"build": "yarn compile-src && ./tools/bin/postbuild",
"publish-patch": "yarn build && ./tools/bin/publish patch",
"publish-minor": "yarn build && ./tools/bin/publish minor",
"publish-major": "yarn build && ./tools/bin/publish major"
"coverage": "nyc report --reporter=text-lcov > ./.nyc_output/lcov.info",
"build": "yarn compile-src",
"prepare": "yarn build"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -53,9 +54,11 @@
"babel-cli": "^6.26.0",
"babel-plugin-istanbul": "^4.1.5",
"chalk": "^2.3.0",
"conventional-changelog-conventionalcommits": "^4.6.1",
"coveralls": "^3.0.0",
"inquirer": "^6.2.0",
"nyc": "^12.0.1",
"semantic-release": "^18.0.0",
"source-map-support": "^0.5.3",
"tslint": "^5.9.1",
"tslint-config-semistandard": "^7.0.0",
Expand Down
16 changes: 16 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
branches: ['master'],
plugins: [
['@semantic-release/commit-analyzer', { preset: 'conventionalcommits' }],
['@semantic-release/npm', { pkgRoot: 'dist/' }],
[
'@semantic-release/github',
{
// Setting this to false disables the default behavior
// of opening a GitHub issue when a release fails.
// We can enable this later if we want.
failComment: false,
},
],
],
};
55 changes: 0 additions & 55 deletions tools/bin/postbuild

This file was deleted.

50 changes: 0 additions & 50 deletions tools/bin/publish

This file was deleted.

47 changes: 0 additions & 47 deletions tools/build-util.js

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig-src-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./work/dist",
"outDir": "./dist",
"module": "CommonJS"
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig-src-es6.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./work/dist/es6",
"outDir": "./dist/es6",
"module": "ES6"
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig-src-esnext.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./work/dist/esnext",
"outDir": "./dist/esnext",
"module": "ESNext"
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"outDir": "./work/dist",
"outDir": "./dist",
"noUnusedLocals": true,
"allowSyntheticDefaultImports": false,
"noImplicitAny": true,
Expand Down
Loading

0 comments on commit c408c55

Please sign in to comment.