Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(setup): add github actions as CI option #502

Merged
merged 23 commits into from
Dec 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use duble quotes in gh actions
  • Loading branch information
jeetiss committed Dec 19, 2019
commit 56eaeb0c14648d32a05a75a87da42b93ef033c00
22 changes: 11 additions & 11 deletions packages/shipjs/src/step/setup/CI/addGitHubActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"
- run: git switch <%= releaseBranch %>
- run: npm install
- run: npm run release:trigger
Expand All @@ -125,9 +125,9 @@ on:
jobs:
manual_prepare:
if: |
github.event_name == 'issue_comment' &&
(github.event.comment.author_association == 'member' || github.event.comment.author_association == 'owner') &&
startsWith(github.event.comment.body, '@shipjs prepare')
github.event_name == "issue_comment" &&
(github.event.comment.author_association == "member" || github.event.comment.author_association == "owner") &&
startsWith(github.event.comment.body, "@shipjs prepare")
runs-on: Ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -137,8 +137,8 @@ jobs:
- uses: actions/setup-node@master
- run: npm install
- run: |
git config --global user.email '<%= gitUserEmail %>'
git config --global user.name '<%= gitUserName %>'
git config --global user.email "<%= gitUserEmail %>"
git config --global user.name "<%= gitUserName %>"
- run: npm run release:prepare -- --yes --no-browse
env:
GITHUB_TOKEN: \${{ secrets.GH_TOKEN }}
Expand All @@ -152,7 +152,7 @@ jobs:
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
with:
args: comment '@\${{ github.actor }} \`shipjs prepare\` done'
args: comment "@\${{ github.actor }} \`shipjs prepare\` done"

create_fail_comment:
if: cancelled() || failure()
Expand All @@ -163,7 +163,7 @@ jobs:
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
with:
args: comment '@\${{ github.actor }} \`shipjs prepare\` fail'
args: comment "@\${{ github.actor }} \`shipjs prepare\` fail"

`,
{ baseBranch, gitUserName, gitUserEmail }
Expand All @@ -182,7 +182,7 @@ name: Ship js Schedule Prepare
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '<%= cronExpr %>'
- cron: "<%= cronExpr %>"
jobs:
schedule_prepare:
runs-on: Ubuntu-latest
Expand All @@ -194,8 +194,8 @@ jobs:
- uses: actions/setup-node@master
- run: npm install
- run: |
git config --global user.email '<%= gitUserEmail %>'
git config --global user.name '<%= gitUserName %>'
git config --global user.email "<%= gitUserEmail %>"
git config --global user.name "<%= gitUserName %>"
- run: npm run release:prepare -- --yes --no-browse
env:
GITHUB_TOKEN: \${{ secrets.GH_TOKEN }}
Expand Down