mermaid/.github/workflows/release-publish.yml

41 lines
982 B
YAML
Raw Normal View History

2019-11-30 23:23:09 +01:00
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
2019-11-30 23:36:13 +01:00
#- name: Install Packages
# run: yarn install --frozen-lockfile
2019-11-30 23:23:09 +01:00
- name: Prepare release
run: |
2019-11-30 23:48:02 +01:00
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}"
2019-11-30 23:23:09 +01:00
git checkout master
2019-11-30 23:48:02 +01:00
git merge -m "Release ${GITHUB_REF:10}" --no-ff release/${GITHUB_REF:10}
git push --delete release/${GITHUB_REF:10}
2019-11-30 23:23:09 +01:00
- name: Publish
run: |
npm set //registry.npmjs.org/:_authToken ${{ secrets.GITHUB_TOKEN }}
npm publish