Skip to content

Commit a77d1af

Browse files
committed
Initial commit
0 parents  commit a77d1af

File tree

10 files changed

+1192
-0
lines changed

10 files changed

+1192
-0
lines changed

.editorconfig

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
### Header #########################################################################################
2+
3+
# Author: Florian Bernd
4+
# Source: https://github.com/zysharp/templates
5+
6+
### Common Settings ################################################################################
7+
8+
# Documentation:
9+
# http://docs.editorconfig.org/en/master/editorconfig-format.html
10+
11+
# This file is the top-most EditorConfig file
12+
root = true
13+
14+
### All Files --------------------------------------------------------------------------------------
15+
16+
[*]
17+
charset = utf-8
18+
indent_style = space
19+
indent_size = 4
20+
insert_final_newline = true
21+
trim_trailing_whitespace = true
22+
23+
### File Extension Settings ------------------------------------------------------------------------
24+
25+
# XML Configuration Files
26+
[*.{xml,config}]
27+
indent_size = 2
28+
29+
# JSON Files
30+
[*.{json,json5,webmanifest}]
31+
indent_size = 2
32+
33+
# YAML Files
34+
[*.{yml,yaml}]
35+
indent_size = 2
36+
37+
# Markdown Files
38+
[*.{md,mdx}]
39+
indent_size = 2
40+
trim_trailing_whitespace = false
41+
42+
# Web Files
43+
[*.{htm,html,js,jsm,jsx,ts,tsx,cjs,cts,ctsx,mjs,mts,mtsx,css,sass,scss,less,pcss,svg,vue}]
44+
indent_size = 2
45+
46+
# Batch Scripts
47+
[*.{bat,cmd,ps1}]
48+
end_of_line = crlf
49+
50+
# Bash Scripts
51+
[*.{bash,fish,sh,zsh}]
52+
end_of_line = lf
53+
54+
# Makefiles
55+
[Makefile]
56+
indent_style = tab
57+
58+
### ------------------------------------------------------------------------------------------------
59+
60+
### License ########################################################################################
61+
62+
# The MIT License (MIT)
63+
#
64+
# Copyright (c) 2022 Florian Bernd
65+
#
66+
# Permission is hereby granted, free of charge, to any person obtaining a copy
67+
# of this software and associated documentation files (the "Software"), to deal
68+
# in the Software without restriction, including without limitation the rights
69+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70+
# copies of the Software, and to permit persons to whom the Software is
71+
# furnished to do so, subject to the following conditions:
72+
#
73+
# The above copyright notice and this permission notice shall be included in all
74+
# copies or substantial portions of the Software.
75+
#
76+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
82+
# SOFTWARE.
83+
84+
####################################################################################################

.gitattributes

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
### Header #########################################################################################
2+
3+
# Author: Florian Bernd
4+
# Source: https://github.com/zysharp/templates
5+
6+
### Git Line Endings ###############################################################################
7+
8+
# Set default behavior to automatically normalize line endings
9+
* text=auto
10+
11+
# Documents
12+
*.md text diff=markdown
13+
*.mdx text diff=markdown
14+
15+
# Serialization
16+
*.json text
17+
*.toml text
18+
*.xml text
19+
*.yml text linguist-language=YAML linguist-detectable -linguist-vendored
20+
*.yaml text linguist-language=YAML linguist-detectable -linguist-vendored
21+
22+
# Graphics
23+
*.eps binary
24+
*.gif binary
25+
*.ico binary
26+
*.jpg binary
27+
*.jpeg binary
28+
*.png binary
29+
*.tif binary
30+
*.tiff binary
31+
32+
# Force batch scripts to always use CRLF line endings
33+
*.bat text eol=crlf
34+
*.cmd text eol=crlf
35+
*.ps1 text eol=crlf
36+
37+
# Force bash scripts to always use LF line endings
38+
*.bash text eol=lf
39+
*.fish text eol=lf
40+
*.sh text eol=lf
41+
*.zsh text eol=lf
42+
43+
# Text files where line endings should be preserved
44+
*.patch -text
45+
46+
### TypeScript / JavaScript ########################################################################
47+
48+
*.js text
49+
*.jsx text
50+
*.ts text
51+
*.tsx text
52+
53+
### Python #########################################################################################
54+
55+
# Source
56+
*.pxd text diff=python
57+
*.py text diff=python
58+
*.py3 text diff=python
59+
*.pyw text diff=python
60+
*.pyx text diff=python
61+
*.pyz text diff=python
62+
*.pyi text diff=python
63+
64+
# Binary
65+
*.db binary
66+
*.p binary
67+
*.pkl binary
68+
*.pickle binary
69+
*.pyc binary export-ignore
70+
*.pyo binary export-ignore
71+
*.pyd binary
72+
73+
### Exclude files from exporting ###################################################################
74+
75+
.gitattributes export-ignore
76+
.gitignore export-ignore
77+
.gitkeep export-ignore
78+
79+
### License ########################################################################################
80+
81+
# The MIT License (MIT)
82+
#
83+
# Copyright (c) 2022 Florian Bernd
84+
#
85+
# Permission is hereby granted, free of charge, to any person obtaining a copy
86+
# of this software and associated documentation files (the "Software"), to deal
87+
# in the Software without restriction, including without limitation the rights
88+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
89+
# copies of the Software, and to permit persons to whom the Software is
90+
# furnished to do so, subject to the following conditions:
91+
#
92+
# The above copyright notice and this permission notice shall be included in all
93+
# copies or substantial portions of the Software.
94+
#
95+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
96+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
97+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
98+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
99+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
100+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
101+
# SOFTWARE.
102+
103+
####################################################################################################

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Documentation
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: github-actions
7+
directory: '/'
8+
schedule:
9+
interval: 'daily'
10+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
name: Test
17+
runs-on: ${{ matrix.platform }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
platform: [ubuntu-latest, macos-latest, windows-latest]
22+
env:
23+
TEST_TAG: 'ci-v1.2.3'
24+
TEST_TAG_PREREL: 'ci-v2.3.4-prerelease'
25+
TAG_MAJOR: 'ci-v1'
26+
TAG_MINOR: 'ci-v1.2'
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
31+
- name: Prepare
32+
uses: actions/github-script@v6
33+
with:
34+
script: |
35+
try {
36+
await github.rest.git.createRef({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
ref: 'refs/tags/${{ env.TEST_TAG }}',
40+
sha: '${{ github.sha }}'
41+
});
42+
} catch (error) {
43+
console.log(`::warning ::Failed to create test tag: '${error.message}'`);
44+
}
45+
46+
- name: 'TEST: Update Major'
47+
uses: ./.
48+
with:
49+
tag: ${{ env.TEST_TAG }}
50+
prefix: 'ci-v'
51+
52+
- name: 'TEST: Update Minor'
53+
uses: ./.
54+
with:
55+
tag: ${{ env.TEST_TAG }}
56+
prefix: 'ci-v'
57+
update-minor: true
58+
59+
- name: 'TEST: Ignore Prerelease'
60+
uses: ./.
61+
with:
62+
tag: ${{ env.TEST_TAG_PREREL }}
63+
prefix: 'ci-v'
64+
65+
- name: Cleanup
66+
if: always()
67+
uses: actions/github-script@v6
68+
with:
69+
script: |
70+
async function tryDeleteTag(name) {
71+
try {
72+
await github.rest.git.deleteRef({
73+
owner: context.repo.owner,
74+
repo: context.repo.repo,
75+
ref: `tags/${name}`
76+
});
77+
} catch (error) {
78+
console.log(`::warning ::Failed to delete tag '${name}': '${error.message}'`);
79+
}
80+
}
81+
82+
await tryDeleteTag('${{ env.TEST_TAG }}');
83+
await tryDeleteTag('${{ env.TAG_MAJOR }}');
84+
await tryDeleteTag('${{ env.TAG_MINOR }}');
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update Floating Version Tags
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update-semver:
9+
name: Update Tags
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Update Semver
16+
uses: ./.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 ZyActions
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)