Skip to content

Commit

Permalink
chore: add shipjs (#122)
Browse files Browse the repository at this point in the history
* remove .npmrc 😭
* add shipjs
* add github actions
  • Loading branch information
jeetiss authored Dec 23, 2019
1 parent f5d40d9 commit 2bc3f01
Show file tree
Hide file tree
Showing 6 changed files with 10,784 additions and 5 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/shipjs-manual-prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

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@master
with:
fetch-depth: 0
ref: master
- uses: actions/setup-node@master
- run: |
if [ -f "yarn.lock" ]; then
yarn install
else
npm install
fi
- run: |
git config --global user.email "[email protected]"
git config --global user.name "jeetiss"
- run: npm run release:prepare -- --yes --no-browse
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}

create_done_comment:
if: success()
needs: manual_prepare
runs-on: Ubuntu-latest
steps:
- uses: actions/github@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: comment "@${{ github.actor }} `shipjs prepare` done"

create_fail_comment:
if: cancelled() || failure()
needs: manual_prepare
runs-on: Ubuntu-latest
steps:
- uses: actions/github@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: comment "@${{ github.actor }} `shipjs prepare` fail"

26 changes: 26 additions & 0 deletions .github/workflows/shipjs-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Ship js trigger
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: Ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
registry-url: "https://registry.npmjs.org"
- run: git switch master
- run: |
if [ -f "yarn.lock" ]; then
yarn install
else
npm install
fi
- run: npm run release:trigger
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

Loading

0 comments on commit 2bc3f01

Please sign in to comment.