-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sematic-release): add dependencies
- Loading branch information
1 parent
f31ad54
commit 67b500a
Showing
5 changed files
with
3,121 additions
and
47 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Bump develop | ||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- name: Run Yarn Install | ||
run: | | ||
cd ui | ||
yarn install | ||
- name: bump | ||
run: | | ||
cd ui | ||
yarn npm:release | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
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 |
---|---|---|
|
@@ -75,7 +75,7 @@ | |
} | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"*.{js,jsx,ts,tsx}": [ | ||
"eslint --cache --fix", | ||
"prettier --write" | ||
] | ||
|
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
const mainConfig = { | ||
branches: [ | ||
"main", | ||
{ name: "develop", channel: "beta", prerelease: "beta" }, | ||
], | ||
repositoryUrl: "https://github.com/mission-apprentissage/cerfa.git", | ||
plugins: [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
changelogFile: "CHANGELOG.md", | ||
}, | ||
], | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
assets: ["CHANGELOG.md"], | ||
message: | ||
// eslint-disable-next-line no-template-curly-in-string | ||
"chore(release): ${nextRelease.version}", | ||
}, | ||
], | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
publishCmd: "git checkout -- package.json", | ||
}, | ||
], | ||
[ | ||
"semantic-release-slack-bot", | ||
{ | ||
notifyOnSuccess: true, | ||
notifyOnFail: true, | ||
markdownReleaseNotes: true, | ||
}, | ||
], | ||
], | ||
}; | ||
|
||
const { execSync } = require("child_process"); | ||
const { createHash } = require("crypto"); | ||
|
||
const branch = execSync("git branch --show-current").toString().trimEnd("\n"); | ||
const channel = createHash("md5").update(branch).digest("hex"); | ||
|
||
const localConfig = { | ||
branches: [ | ||
"main", | ||
{ name: "develop", channel: "beta", prerelease: "beta" }, | ||
{ | ||
name: branch, | ||
channel, | ||
prerelease: channel, | ||
}, | ||
], | ||
repositoryUrl: "https://github.com/mission-apprentissage/cerfa.git", | ||
plugins: ["@semantic-release/commit-analyzer", "@semantic-release/npm"], | ||
}; | ||
|
||
module.exports = process.env.LOCAL_RELEASE ? localConfig : mainConfig; |
Oops, something went wrong.