Skip to content

Commit

Permalink
chore: migrate to projen (#132)
Browse files Browse the repository at this point in the history
Migrate the project to [projen]

[projen]: https://github.com/eladb/projen
  • Loading branch information
Elad Ben-Israel authored Jul 5, 2020
1 parent 1c174f7 commit 9421244
Show file tree
Hide file tree
Showing 27 changed files with 2,157 additions and 926 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

83 changes: 83 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"env": {
"jest": true,
"node": true
},
"plugins": [
"@typescript-eslint",
"import"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "2018",
"sourceType": "module"
},
"extends": [
"plugin:import/typescript"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"node": {},
"typescript": {
"directory": "./tsconfig.json"
}
}
},
"ignorePatterns": [
"*.js",
"*.d.ts",
"node_modules/",
"*.generated.ts",
"coverage"
],
"rules": {
"@typescript-eslint/no-require-imports": [
"error"
],
"indent": [
"off"
],
"@typescript-eslint/indent": [
"error",
2
],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"comma-dangle": [
"error",
"always-multiline"
],
"quote-props": [
"error",
"consistent-as-needed",
{
"unnecessary": true
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/build-tools/**",
"**/test/**"
],
"optionalDependencies": false,
"peerDependencies": true
}
],
"import/no-unresolved": [
"error"
]
}
}
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: Build
on:
- pull_request

pull_request: {}
jobs:
build:
runs-on: ubuntu-latest
container:
image: jsii/superchain

steps:
- uses: actions/checkout@v2
- run: yarn install
- uses: actions/setup-node@v1
with:
node-version: 10.17.0
- run: npx projen@0.2.5
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Anti-tamper check
run: git diff --exit-code
container:
image: jsii/superchain
80 changes: 72 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,93 @@
# Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: Release
on:
push:
branches:
- master
- 2.x

jobs:
build:
runs-on: ubuntu-latest
container:
image: jsii/superchain

steps:
- uses: actions/checkout@v2
- run: yarn install
- uses: actions/setup-node@v1
with:
node-version: 10.17.0
- run: npx projen@0.2.5
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn release
- name: Anti-tamper check
run: git diff --exit-code
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
container:
image: jsii/superchain
release_npm:
name: Release to NPM
needs: build
runs-on: ubuntu-latest
container:
image: jsii/superchain
steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: dist
- name: Release
run: npx -p jsii-release jsii-release-npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_DIST_TAG: latest
release_maven:
name: Release to Maven
needs: build
runs-on: ubuntu-latest
container:
image: jsii/superchain
steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: dist
- name: Release
run: npx -p jsii-release jsii-release-maven
env:
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
MAVEN_GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_KEY_PASSPHRASE }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
release_pypi:
name: Release to PyPi
needs: build
runs-on: ubuntu-latest
container:
image: jsii/superchain
steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: dist
- name: Release
run: npx -p jsii-release jsii-release-pypi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
release_nuget:
name: Release to Nuget
needs: build
runs-on: ubuntu-latest
container:
image: jsii/superchain
steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: dist
- name: Release
run: npx -p jsii-release jsii-release-nuget
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
Loading

0 comments on commit 9421244

Please sign in to comment.