Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ jobs:
run: yarn cover
if: env.GIT_DIFF || github.event_name == 'push'
- name: Codecov
run: curl -s https://codecov.io/bash | bash -s -- -t $CODECOV_TOKEN -f $COVERAGE_FILE
run: |
if [ -n "$CODECOV_TOKEN" ]; then
curl -s https://codecov.io/bash | bash -s -- -t $CODECOV_TOKEN -f $COVERAGE_FILE
fi
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERAGE_FILE: ./coverage/lcov.info
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,87 @@ jobs:
TEST_TAG_PREFIX: test/
ORIGINAL_TAG_PREFIX: original/
CLEAN_TEST_TAG: true
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

package:
name: Publish Package
runs-on: ubuntu-latest
strategy:
matrix:
target: ['npm']
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 3
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
if: matrix.target == 'npm'
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com
if: matrix.target == 'gpr'
- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node dependencies
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_DISABLED: 1
- name: Install Package dependencies
run: yarn install
- name: Build
run: yarn build
- name: Publish
run: |
if [ -n "$NPM_AUTH_TOKEN" ]; then
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm publish
fi
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
if: matrix.target == 'npm'
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: matrix.target == 'gpr'
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

slack:
name: Slack
needs: [release, package]
runs-on: ubuntu-latest
steps:
- uses: 8398a7/action-slack@v1
with:
type: success
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}