-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added semantic-release integration
- Loading branch information
Sergio
committed
Oct 26, 2020
1 parent
2da90b1
commit 88128f2
Showing
5 changed files
with
3,311 additions
and
73 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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: Main CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
distTag: | ||
description: 'Dist tag to publish' | ||
required: true | ||
default: 'latest' | ||
pull_request: | ||
push: | ||
branches: | ||
|
@@ -16,6 +22,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Restore cache | ||
|
@@ -30,10 +37,21 @@ jobs: | |
always-auth: true | ||
node-version: 12 | ||
|
||
- name: Creates local .npmrc | ||
if: ${{github.event.inputs.distTag == 'latest'}} | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build & Testing | ||
run: | | ||
yarn build | ||
yarn test | ||
- name: Release | ||
if: ${{github.event.inputs.distTag == 'latest'}} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Lingui CI" | ||
npm run release |
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
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 |
---|---|---|
|
@@ -20,7 +20,8 @@ | |
"scripts": { | ||
"test": "jest", | ||
"build": "tsc && chmod 755 ./bin/lingui-codemod.js", | ||
"jscodeshift": "jscodeshift" | ||
"jscodeshift": "jscodeshift", | ||
"release": "semantic-release" | ||
}, | ||
"dependencies": { | ||
"chalk": "^2.4.2", | ||
|
@@ -34,14 +35,23 @@ | |
"devDependencies": { | ||
"@babel/core": "^7.12.3", | ||
"@babel/preset-env": "^7.12.1", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@types/jest": "^26.0.15", | ||
"@types/jscodeshift": "^0.7.1", | ||
"@types/node": "^14.14.0", | ||
"jest": "^26.6.0", | ||
"semantic-release": "^17.2.1", | ||
"ts-jest": "^26.4.1", | ||
"typescript": "^4.0.3" | ||
}, | ||
"contributors": [ | ||
"Sergio Moreno <[email protected]>" | ||
], | ||
"keywords": [ | ||
"@lingui", | ||
"lingui", | ||
"jscodeshift", | ||
"codemods" | ||
] | ||
} |
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,23 @@ | ||
module.exports = { | ||
branches: [ | ||
"main" | ||
], | ||
plugins: [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
npmPublish: true, | ||
pkgRoot: "." | ||
}, | ||
], | ||
{ | ||
assets: ["package.json", "CHANGELOG.md"], | ||
message: "chore(release): ${nextRelease.version} ${nextRelease.notes}", | ||
path: "@semantic-release/git", | ||
}, | ||
"@semantic-release/github" | ||
], | ||
}; |
Oops, something went wrong.