Skip to content

Commit 0f649c8

Browse files
committed
ci(workflows): added workflows
1 parent 64566d2 commit 0f649c8

File tree

7 files changed

+380
-3
lines changed

7 files changed

+380
-3
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* **Please check if the PR fulfills these requirements**
2+
- [ ] The commit message follows our guidelines
3+
- [ ] Tests for the changes have been added (for bug fixes / features)
4+
- [ ] Docs have been added / updated (for bug fixes / features)
5+
6+
7+
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
8+
9+
10+
11+
* **What is the current behavior?** (You can also link to an open issue here)
12+
13+
14+
15+
* **What is the new behavior (if this is a feature change)?**
16+
17+
18+
19+
* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
20+
21+
22+
23+
* **Other information**:

.github/workflows/main.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
install:
14+
if: "!contains(github.event.head_commit.message, 'skip ci')"
15+
name: Install
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest]
21+
node: [20]
22+
23+
steps:
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node }}
27+
- name: Checkout Repo
28+
uses: actions/checkout@v4
29+
- name: cache node_modules
30+
uses: actions/cache@v4
31+
id: cache
32+
with:
33+
path: |
34+
node_modules
35+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
36+
37+
- name: Install Dependencies
38+
if: steps.cache.outputs.cache-hit != 'true'
39+
run: npm ci
40+
41+
- name: Install Playwright
42+
run: npx playwright install --with-deps
43+
44+
- name: Lint
45+
run: npm run lint
46+
47+
- name: Test
48+
run: npm run test
49+
50+
semantic-version:
51+
name: Semantic Release
52+
needs: install
53+
runs-on: ${{ matrix.os }}
54+
55+
strategy:
56+
matrix:
57+
os: [ubuntu-latest]
58+
node: [20]
59+
60+
steps:
61+
- uses: actions/setup-node@v4
62+
with:
63+
node-version: ${{ matrix.node }}
64+
- name: Checkout Repo
65+
uses: actions/checkout@v4
66+
- name: cache node_modules
67+
uses: actions/cache@v4
68+
id: cache
69+
with:
70+
path: node_modules
71+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
72+
- name: Versioning
73+
env:
74+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
77+
HUSKY: 0
78+
run: |
79+
npx -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/github semantic-release --provider=github --debug=true

.github/workflows/next.yml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: Next
2+
3+
on:
4+
push:
5+
branches:
6+
- next
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
install:
14+
if: "!contains(github.event.head_commit.message, 'skip ci')"
15+
name: Install
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest]
21+
node: [20]
22+
23+
steps:
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node }}
27+
- name: Checkout Repo
28+
uses: actions/checkout@v4
29+
- name: cache node_modules
30+
uses: actions/cache@v4
31+
id: cache
32+
with:
33+
path: |
34+
node_modules
35+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
36+
37+
- name: Install Dependencies
38+
if: steps.cache.outputs.cache-hit != 'true'
39+
run: npm ci
40+
41+
- name: Lint
42+
run: npm run lint
43+
44+
- name: Test
45+
run: npm run test
46+
47+
semantic-version:
48+
name: Semantic Release
49+
needs: install
50+
runs-on: ${{ matrix.os }}
51+
52+
strategy:
53+
matrix:
54+
os: [ubuntu-latest]
55+
node: [20]
56+
57+
steps:
58+
- uses: actions/setup-node@v4
59+
with:
60+
node-version: ${{ matrix.node }}
61+
- name: Checkout Repo
62+
uses: actions/checkout@v4
63+
- name: cache node_modules
64+
uses: actions/cache@v4
65+
id: cache
66+
with:
67+
path: node_modules
68+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
69+
- name: Versioning
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
73+
run: |
74+
npx -p @nuxt/module-builder -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/github semantic-release --provider=github --debug=true
75+
76+
build-playground:
77+
name: Build (Playground)
78+
needs: semantic-version
79+
runs-on: ${{ matrix.os }}
80+
81+
strategy:
82+
matrix:
83+
os: [ubuntu-latest]
84+
node: [20]
85+
86+
steps:
87+
- uses: actions/setup-node@v4
88+
with:
89+
node-version: ${{ matrix.node }}
90+
- name: Checkout Repo
91+
uses: actions/checkout@v4
92+
- name: cache node_modules
93+
uses: actions/cache@v4
94+
id: cache
95+
with:
96+
path: node_modules
97+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
98+
- name: Build
99+
run: |
100+
npm run build
101+
touch playground/dist/.nojekyll
102+
env:
103+
BASE_URL: /vue-semantic-structure/playground/
104+
- name: Archive Production Artifact
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: playgroundArtifact
108+
path: playground/dist
109+
110+
build-docs:
111+
name: Build (Docs)
112+
needs: semantic-version
113+
runs-on: ${{ matrix.os }}
114+
115+
strategy:
116+
matrix:
117+
os: [ubuntu-latest]
118+
node: [20]
119+
120+
steps:
121+
- uses: actions/setup-node@v4
122+
with:
123+
node-version: ${{ matrix.node }}
124+
- name: Checkout Repo
125+
uses: actions/checkout@v4
126+
- name: cache docs/node_modules
127+
uses: actions/cache@v4
128+
id: cache
129+
with:
130+
path: |
131+
node_modules
132+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
133+
- name: Build
134+
run: |
135+
npm run docs:build
136+
touch docs/.vitepress/dist/.nojekyll
137+
env:
138+
BASE_URL: /vue-semantic-structure/
139+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
- name: Archive Production Artifact
141+
uses: actions/upload-artifact@v4
142+
with:
143+
name: docsArtifact
144+
path: docs/.vitepress/dist
145+
146+
deploy-ghpages:
147+
name: Deploy (GH-Pages)
148+
needs: [build-docs, build-playground]
149+
runs-on: ${{ matrix.os }}
150+
strategy:
151+
matrix:
152+
os: [ubuntu-latest]
153+
node: [20]
154+
steps:
155+
- name: Download Artifact (Docs)
156+
uses: actions/download-artifact@v4
157+
with:
158+
name: docsArtifact
159+
path: public
160+
- name: Download Artifact (Playground)
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: playgroundArtifact
164+
path: public/playground
165+
- name: Deploy to GH-Pages
166+
uses: peaceiris/actions-gh-pages@v4
167+
with:
168+
github_token: ${{ secrets.GITHUB_TOKEN }}
169+
publish_dir: public

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
name: Test & Build
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
#os: [ubuntu-latest, macos-latest, windows-latest]
20+
node: [20]
21+
22+
steps:
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node }}
26+
27+
- name: Checkout Repo
28+
uses: actions/checkout@v4
29+
30+
- name: cache node_modules
31+
uses: actions/cache@v4
32+
id: cache
33+
with:
34+
path: |
35+
node_modules
36+
~/.cache/ms-playwright/
37+
~\AppData\Local\ms-playwright\
38+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
39+
40+
- name: Install Dependencies
41+
if: steps.cache.outputs.cache-hit != 'true'
42+
run: npm ci
43+
44+
- name: Install Playwright
45+
run: npx playwright install --with-deps
46+
47+
- name: Lint
48+
run: npm run lint
49+
50+
- name: Test
51+
run: npm run test

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
- [  **Release Notes**](./CHANGELOG.md)
1616
- [👁   **Example**](https://basics.github.io/vue-sematic-release/example)
1717

18-
Nuxt Booster takes over the Lighthouse performance optimization of your generated website.
19-
All used components and resources are loaded on demand based on the viewport.
20-
2118
## Getting Started
2219

2320
Please follow the [📖   **Documentation**](https://basics.github.io/vue-sematic-release/)

0 commit comments

Comments
 (0)