Skip to content

Commit 162b0a9

Browse files
authored
Merge pull request #1 from open-template-hub/develop
Release/init library
2 parents 985c975 + bf060b3 commit 162b0a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10161
-2
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
day: 'monday'
9+
time: '08:00'
10+
timezone: 'Etc/GMT'
11+
target-branch: 'workflow/dependency-update'
12+
labels:
13+
- 'workflow'
14+
milestone: 2

.github/pr-labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
bug: 'bug/*'
2+
dependency: 'dependency/*'
3+
documentation: 'documentation/*'
4+
feature: 'feature/*'
5+
hotfix: 'hotfix/*'
6+
quality: 'quality/*'
7+
workflow: 'workflow/*'
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Cron Dependency Checker Workflow
2+
3+
on:
4+
schedule:
5+
- cron: '0 4 * * 1'
6+
7+
jobs:
8+
cron-dependency-checker:
9+
name: 'Cron Dependency Checker'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Repo
13+
uses: actions/checkout@v2
14+
with:
15+
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
16+
17+
- name: Install Node
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: 12
21+
22+
- name: NPM Install
23+
run: npm i
24+
- name: Npm Outdated
25+
run: npm run outdated
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Check for Changes
30+
run: |
31+
if git diff --exit-code; then
32+
echo "changes_exist=false" >> $GITHUB_ENV
33+
else
34+
echo "changes_exist=true" >> $GITHUB_ENV
35+
fi
36+
37+
- name: Git Commit and Push
38+
if: ${{ env.changes_exist == 'true' }}
39+
run: |
40+
git config --global user.email "98660390+oth-service-user@users.noreply.github.com"
41+
git config --global user.name "OTH Service User"
42+
git commit -am "Workflow/dependency check"
43+
git push
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Issue Assigned Workflows
2+
3+
on:
4+
issues:
5+
types: [ assigned ]
6+
7+
jobs:
8+
automate-project-columns:
9+
name: 'Automate Project Columns'
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Move Issue to In-Progress
14+
uses: alex-page/github-project-automation-plus@v0.3.0
15+
with:
16+
project: Open Template Hub Servers
17+
column: In progress
18+
repo-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Issue Open Workflows
2+
3+
on:
4+
issues:
5+
types: [ opened ]
6+
7+
jobs:
8+
automate-project-columns:
9+
name: "Automate Project Columns"
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Move Issue to In-Progress
14+
uses: alex-page/github-project-automation-plus@v0.3.0
15+
with:
16+
project: Open Template Hub Servers
17+
column: To do
18+
repo-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
19+
20+
milestone-binder:
21+
name: "Milestone Binder"
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Set Milestone of the Issue
26+
uses: Code-Hex/auto-milestone-binder@v1.0.1
27+
with:
28+
github-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

.github/workflows/on-push-tags.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: On Push Tags Workflows
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
tagged-release:
10+
name: 'Tagged Release'
11+
runs-on: 'ubuntu-latest'
12+
13+
steps:
14+
- name: Generate Release From Tag
15+
uses: 'marvinpinto/action-automatic-releases@latest'
16+
with:
17+
repo_token: '${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}'
18+
prerelease: false
19+
20+
publish-npm:
21+
name: 'Publish to NPM'
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
26+
- name: Checkout Repo
27+
uses: actions/checkout@v2
28+
29+
- name: Install Node
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: 12
33+
registry-url: https://registry.npmjs.org/
34+
35+
- name: NPM Install
36+
run: npm install
37+
- name: NPM Continous Integration
38+
run: npm ci
39+
- name: NPM Build
40+
run: npm run-script build
41+
- name: NPM Publish
42+
working-directory: ./dist/animated-code-editor
43+
run: npm publish --access public
44+
env:
45+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
46+
47+
publish-gpr:
48+
name: 'Publish to GitHub'
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
53+
- name: Checkout Repo
54+
uses: actions/checkout@v2
55+
56+
- name: Install Node
57+
uses: actions/setup-node@v1
58+
with:
59+
node-version: 12
60+
registry-url: https://npm.pkg.github.com
61+
scope: '@open-template-hub'
62+
63+
- name: NPM Install
64+
run: npm install
65+
- name: NPM Continous Integration
66+
run: npm ci
67+
- name: NPM Build
68+
run: npm run-script build
69+
- name: NPM Publish
70+
working-directory: ./dist/animated-code-editor
71+
run: npm publish --access public
72+
env:
73+
NODE_AUTH_TOKEN: ${{secrets.MASTER_BRANCH_ACCESS_TOKEN}}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: On Version Update Workflows
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'package.json'
7+
- 'projects/animated-code-editor/package.json'
8+
branches:
9+
- 'master'
10+
11+
jobs:
12+
bump-version:
13+
name: 'Update Version'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v2
19+
with:
20+
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
21+
22+
- name: Install Node
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: 12
26+
27+
- name: Bump Version and Create Tag
28+
uses: phips28/gh-action-bump-version@master
29+
env:
30+
PACKAGEJSON_DIR: 'projects/animated-code-editor'
31+
with:
32+
tag-prefix: ''
33+
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
34+
35+
create-version-update-pr:
36+
name: 'Create Version Update PR'
37+
runs-on: ubuntu-latest
38+
needs: bump-version
39+
40+
steps:
41+
- name: Checkout Repo
42+
uses: actions/checkout@v2
43+
with:
44+
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
45+
ref: develop
46+
47+
- name: Hard Reset Develop from Master
48+
run: |
49+
git fetch origin master:master
50+
git reset --hard master
51+
52+
- name: Create PR
53+
uses: peter-evans/create-pull-request@v3
54+
with:
55+
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
56+
branch: workflow/version-update
57+
delete-branch: true
58+
base: develop
59+
title: 'Workflow/version update'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: PR Labeled at Develop Workflows
2+
3+
on:
4+
pull_request:
5+
types:
6+
- labeled
7+
branches:
8+
- develop
9+
10+
jobs:
11+
auto-merge:
12+
name: 'Auto Merge'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: automerge
16+
uses: 'pascalgn/automerge-action@v0.14.3'
17+
env:
18+
GITHUB_TOKEN: '${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}'
19+
MERGE_LABELS: 'workflow'
20+
MERGE_COMMIT_MESSAGE: 'Auto merge for PR with workflow label'
21+
MERGE_FORKS: 'false'
22+
MERGE_RETRY_SLEEP: '60000'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Open To Demos Workflows
2+
3+
on:
4+
pull_request:
5+
types: [ opened ]
6+
branches:
7+
- demo/*
8+
9+
jobs:
10+
reset-demo-from-develop:
11+
name: 'Reset Demo From Develop'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v2
16+
with:
17+
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
18+
ref: ${{ github.event.pull_request.base.ref }}
19+
- name: Hard Reset Demo From Develop
20+
run: |
21+
git fetch origin develop:develop
22+
git reset --hard origin/develop
23+
git push -f

0 commit comments

Comments
 (0)