mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-30 12:49:41 +02:00
Added first workflows
This commit is contained in:
13
.github/workflows/pr-labeler.yml
vendored
Normal file
13
.github/workflows/pr-labeler.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Apply labels to PR
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
pr-labeler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Label PR
|
||||
uses: TimonVS/pr-labeler-action@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
15
.github/workflows/release-draft.yml
vendored
Normal file
15
.github/workflows/release-draft.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Draft Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- development
|
||||
|
||||
jobs:
|
||||
draft-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Draft Release
|
||||
uses: toolmantim/release-drafter@v5.2.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -8,15 +8,12 @@ on:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Node.js ${{ matrix.node-version }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
node-version: 10.x
|
||||
- name: Install Yarn
|
||||
run: npm i yarn --global
|
||||
|
||||
@@ -24,7 +21,7 @@ jobs:
|
||||
run: npm i json --global
|
||||
|
||||
- name: Install Packages
|
||||
run: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
|
38
.github/workflows/release-publish.yml
vendored
Normal file
38
.github/workflows/release-publish.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
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:11}"
|
||||
git checkout master
|
||||
git merge -m "Release ${GITHUB_REF:11}" --no-ff release/${GITHUB_REF:11}
|
||||
git push --delete release/${GITHUB_REF:11}
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
npm version --no-git-tag-version --allow-same-version ${GITHUB_REF:11}
|
||||
npm set //registry.npmjs.org/:_authToken ${{ secrets.GITHUB_TOKEN }}
|
||||
npm publish
|
||||
|
Reference in New Issue
Block a user