mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
5f3bb4aeeb
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Publish release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: fregante/setup-git-user@v1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.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: |
|
|
VERSION=${GITHUB_REF:10}
|
|
echo "Preparing release $VERSION"
|
|
git checkout -t origin/release/$VERSION
|
|
npm version --no-git-tag-version --allow-same-version $VERSION
|
|
git add package.json
|
|
git commit -m "Bump version $VERSION"
|
|
git checkout -t origin/master
|
|
git merge -m "Release $VERSION" --no-ff release/$VERSION
|
|
git push --no-verify
|
|
|
|
- name: Publish
|
|
run: |
|
|
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
|
|
npm publish
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|