2019-10-12 22:44:26 -04:00
|
|
|
name: Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-08-02 11:38:00 -07:00
|
|
|
branches:
|
|
|
|
- master
|
2021-08-12 20:58:47 -07:00
|
|
|
paths-ignore:
|
|
|
|
- README.md
|
|
|
|
- .gitignore
|
|
|
|
- .github/**
|
2019-10-12 22:44:26 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
- run: npm install
|
2019-10-12 23:01:48 -04:00
|
|
|
- run: npm run test -- --coverage --watchAll=false
|
2021-08-02 11:38:00 -07:00
|
|
|
|
2019-10-12 22:44:26 -04:00
|
|
|
- name: Setup GIT
|
|
|
|
run: |
|
2020-01-16 16:36:52 -05:00
|
|
|
git reset --hard
|
2019-10-12 22:58:04 -04:00
|
|
|
git config --local --list
|
2019-10-12 22:44:26 -04:00
|
|
|
git checkout master
|
|
|
|
git config user.email "$GH_EMAIL"
|
|
|
|
git config user.name "Francisco Hodge"
|
|
|
|
env:
|
2021-08-02 11:38:00 -07:00
|
|
|
GH_EMAIL: ${{secrets.GH_EMAIL}}
|
|
|
|
|
2019-10-12 22:44:26 -04:00
|
|
|
- name: Bump version
|
|
|
|
run: |
|
2019-10-12 23:27:28 -04:00
|
|
|
git reset --hard
|
2019-10-12 22:44:26 -04:00
|
|
|
npm version patch
|
2019-10-12 23:23:48 -04:00
|
|
|
npm run build
|
|
|
|
git add . || true
|
2019-10-13 00:21:46 -04:00
|
|
|
git commit -m "Build update" || true
|
2019-10-12 22:44:26 -04:00
|
|
|
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
2021-08-02 11:38:00 -07:00
|
|
|
|
2019-10-12 22:44:26 -04:00
|
|
|
- name: npm publish
|
|
|
|
run: |
|
|
|
|
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
|
|
|
|
npm run trypublish
|
|
|
|
env:
|
2021-08-02 11:38:00 -07:00
|
|
|
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|