Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
perf: ⚡️ release.config.js, fork => .github/workflows 👷️ canary 🐦️
Browse files Browse the repository at this point in the history
- Allow for canary branches for pre-release (on fork currently) 🐦️
- Move semantic-release into own config (future-proof customizations) 🔧️
- dotenv => localized testing, not 100% needed (add .env to ignores) 🙈️
- prep for move away from master into main 💯️i
  - made a `prerelease` branch for now
  • Loading branch information
JeromeFitz committed Feb 28, 2021
1 parent 6b80de4 commit 428f561
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 14 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: '🚀️ Semantic Release'
on:
pull_request:
branches:
- main
- master
- canary
push:
branches:
- main
- master
- canary
jobs:
release:
name: '🚀️ Semantic Release'
runs-on: ubuntu-latest
steps:
- name: '🐙️ Git Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: '🌵️ Cache-tus'
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: '📦️ Install Dependecies'
run: |
yarn install --frozen-lockfile --ignore-engines --network-concurrency 1
- name: '🏗️ Build Step'
run: |
yarn lint
yarn build
yarn build:binaries
yarn test
- name: '🏷️ Semantic Version: Release'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ yarn-error.log
dist/
package-lock.json
/binaries/
coverage/
coverage/
# fork
.env
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ yarn.lock
/test/
/build/
/docs/
# fork
.env
.github/
.husky/
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"chai": "4.3.0",
"chalk": "4.1.0",
"commitizen": "4.2.3",
"dotenv": "8.2.0",
"eslint": "7.21.0",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-filenames": "1.3.2",
Expand Down Expand Up @@ -79,15 +80,5 @@
"out": "./README.md",
"scripts": "./build/readme.js",
"backup": false
},
"release": {
"verifyConditions": [
"@semantic-release/changelog",
"@semantic-release/git"
],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/git"
]
}
}
19 changes: 19 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const isCI = require('is-ci');
// eslint-disable-next-line global-require, no-unused-expressions
!isCI && require('dotenv').config({path: './.env'});

module.exports = {
branches: [
// eslint-disable-next-line object-property-newline
{name: 'main', prerelease: 'main'},
{name: 'master'},
// eslint-disable-next-line object-property-newline
{name: 'canary', prerelease: 'canary'}
],
extends: [],
plugins: [
'@semantic-release/changelog',
'@semantic-release/npm',
'@semantic-release/git'
]
};
24 changes: 21 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2974,6 +2974,11 @@ dot-prop@^5.1.0:
dependencies:
is-obj "^2.0.0"

dotenv@8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==

dotenv@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
Expand Down Expand Up @@ -3922,7 +3927,7 @@ genfun@^5.0.0:
resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537"
integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==

gensync@^1.0.0-beta.2:
gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
Expand Down Expand Up @@ -4737,7 +4742,7 @@ is-cidr@^3.0.0:
dependencies:
cidr-regex "^2.0.10"

is-core-module@^2.2.0:
is-core-module@^2.1.0, is-core-module@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
Expand Down Expand Up @@ -5608,7 +5613,7 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"

json5@^2.1.2:
json5@^2.1.0, json5@^2.1.2:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
Expand Down Expand Up @@ -6320,6 +6325,11 @@ minimist-options@4.1.0:
is-plain-obj "^1.1.0"
kind-of "^6.0.3"

minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=

minimist@1.2.5, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
Expand Down Expand Up @@ -8124,6 +8134,14 @@ resolve@^1.18.1:
is-core-module "^2.1.0"
path-parse "^1.0.6"

resolve@^1.3.2:
version "1.20.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
dependencies:
is-core-module "^2.2.0"
path-parse "^1.0.6"

restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
Expand Down

0 comments on commit 428f561

Please sign in to comment.