Skip to content

Commit 9fd1364

Browse files
authored
Merge pull request #11 from geekcell/line-appender
Line appender
2 parents aea27b1 + 241f46d commit 9fd1364

File tree

10 files changed

+4978
-52998
lines changed

10 files changed

+4978
-52998
lines changed

.github/workflows/linter.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Linter
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
linter:
14+
name: Linter
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4.0.0
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3.8.1
22+
with:
23+
node-version-file: .nvmrc
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm ci --ignore-scripts
28+
29+
- name: Check code style
30+
run: npm run lint

.github/workflows/release.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*.*.*' ]
7+
pull_request:
8+
types: [ labeled ]
9+
10+
jobs:
11+
release:
12+
name: Create Release
13+
if: github.event.action != 'labeled'
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4.0.0
19+
20+
- name: Bump version
21+
if: "!startsWith(github.ref, 'refs/tags/')"
22+
id: bumpr
23+
uses: haya14busa/action-bumpr@v1
24+
25+
- name: Update tag
26+
if: "!steps.bumpr.outputs.skip"
27+
uses: haya14busa/action-update-semver@v1
28+
with:
29+
tag: ${{ steps.bumpr.outputs.next_version }}
30+
31+
- name: Get tag name
32+
id: tag
33+
uses: haya14busa/action-cond@v1
34+
with:
35+
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
36+
if_true: "${{ github.ref }}"
37+
if_false: "${{ steps.bumpr.outputs.next_version }}"
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@v3.8.1
41+
with:
42+
node-version-file: .nvmrc
43+
cache: npm
44+
45+
- name: Install dependencies
46+
run: npm ci --ignore-scripts
47+
48+
- name: Build prod assets
49+
if: "steps.tag.outputs.value != ''"
50+
run: npm run build
51+
52+
- name: Create release
53+
uses: softprops/action-gh-release@v0.1.15
54+
if: "steps.tag.outputs.value != ''"
55+
with:
56+
name: Release ${{ steps.tag.outputs.value }}
57+
body: ${{ steps.bumpr.outputs.message }}
58+
tag_name: ${{ steps.tag.outputs.value }}
59+
60+
release-check:
61+
if: github.event.action == 'labeled'
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout Code
65+
uses: actions/checkout@v4.0.0
66+
67+
- name: Post bumpr status comment
68+
uses: haya14busa/action-bumpr@v1
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Sync labels
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 1 * *"
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
sync-labels:
14+
name: Sync labels
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Sync labels
18+
uses: EndBug/label-sync@v2.3.1
19+
with:
20+
config-file: https://gist.githubusercontent.com/Ic3w0lf/f5520c5f19d7098966f692c120f7a197/raw/75b134f76fbc55e2e64bd66f04e571d6d74b815e/terraform-aws-module-labels.yaml

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ logs
1010
npm-debug.log*
1111
yarn-debug.log*
1212
yarn-error.log*
13+
14+
# Build files
15+
dist

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.7

0 commit comments

Comments
 (0)