This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
chore(deps): update codecov/codecov-action action to v3.1.4 #812
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
name: Ship js Manual Prepare | |
on: | |
issue_comment: | |
types: [created] | |
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') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: master | |
- uses: actions/setup-node@v3 | |
- run: | | |
yarn install | |
- run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- run: npm run release:prepare -- --yes --no-browse | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
create_done_comment: | |
if: success() | |
needs: manual_prepare | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `@${context.actor} \`shipjs prepare\` done` | |
}) | |
create_fail_comment: | |
if: cancelled() || failure() | |
needs: manual_prepare | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `@${context.actor} \`shipjs prepare\` fail` | |
}) |