Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Copy react-query semeantic-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NateRadebaugh committed May 31, 2020
1 parent 6409b17 commit 352c2d0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/semantic-release.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: react-datetime tests

on:
push:
branches:
- "master"
pull_request:

jobs:
test:
name: "node ${{ matrix.node }} ${{ matrix.os }} "
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-latest]
node: [12, 10]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: npm i -g yarn
- run: yarn --frozen-lockfile
- run: yarn test:ci

publish-module:
name: "Publish Module to NPM"
needs: test
if: github.ref == 'refs/heads/master' #publish only when merged in master, not on PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm i -g yarn
- run: yarn --frozen-lockfile
- run: npx semantic-release@17
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GH_TOKEN: ${{secrets.GH_TOKEN}}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"dev": "tsdx watch --format=esm",
"start": "yarn dev",
"test": "yarn lint:fix&&cross-env CI=1 TZ=Europe/Stockholm tsdx test",
"test:ci": "yarn lint:fix&&cross-env CI=1 TZ=Europe/Stockholm tsdx test",
"test:coverage": "yarn test --coverage",
"test:all": "echo 'Running tests...' && yarn bundlesize && yarn test:coverage && echo 'All tests passed! 🤘'",
"test:watch": "cross-env TZ=Europe/Stockholm tsdx test --watch",
Expand Down

1 comment on commit 352c2d0

@vercel
Copy link

@vercel vercel bot commented on 352c2d0 May 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.