mermaid/.github/workflows/release-publish.yml
2019-11-30 23:49:04 +01:00

41 lines
982 B
YAML

name: Publish release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install Yarn
run: npm i yarn --global
- name: Install Json
run: npm i json --global
#- name: Install Packages
# run: yarn install --frozen-lockfile
- name: Prepare release
run: |
echo "Preparing release ${GITHUB_REF:10}"
npm version --no-git-tag-version --allow-same-version ${GITHUB_REF:10}
git add package.json
git commit -m "Bump version ${GITHUB_REF:10}"
git checkout master
git merge -m "Release ${GITHUB_REF:10}" --no-ff release/${GITHUB_REF:10}
git push --delete release/${GITHUB_REF:10}
- name: Publish
run: |
npm set //registry.npmjs.org/:_authToken ${{ secrets.GITHUB_TOKEN }}
npm publish