Skip to content

Commit c155f67

Browse files
authored
Merge pull request #69 from OneLiteFeatherNET/feat/releases
Feat/releases
2 parents 2c4b09c + f3e33cb commit c155f67

File tree

21 files changed

+448
-196
lines changed

21 files changed

+448
-196
lines changed

.github/workflows/charts.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "charts/**"
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Configure Git
20+
run: |
21+
git config user.name "$GITHUB_ACTOR"
22+
git config user.email "[email protected]"
23+
24+
- name: Install Helm
25+
uses: azure/setup-helm@v4
26+
env:
27+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
28+
29+
- name: Run chart-releaser
30+
uses: helm/[email protected]
31+
with:
32+
charts_dir: charts
33+
env:
34+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch:
55
pull_request:
66
merge_group:
7+
push:
8+
branches:
9+
- main
710

811
jobs:
912
check:
@@ -74,7 +77,7 @@ jobs:
7477
strategy:
7578
fail-fast: false
7679
matrix:
77-
database: [postgres, mysql, mariadb, mssql]
80+
test: [postgres, mysql, mariadb, mssql, unittest]
7881
steps:
7982
- name: Install toolchain
8083
uses: actions-rs/toolchain@v1
@@ -101,4 +104,4 @@ jobs:
101104
args: cargo-make
102105

103106
- name: Tests
104-
run: cargo make ${{ matrix.database }}
107+
run: cargo make ${{ matrix.test }}

.github/workflows/lib.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "lib-*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: "20"
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 8
24+
25+
- name: Install dependencies
26+
run: pnpm i
27+
working-directory: lib
28+
29+
- name: Build
30+
run: pnpm run tsc
31+
working-directory: lib
32+
33+
- name: Publish
34+
uses: JS-DevTools/npm-publish@v3
35+
working-directory: lib
36+
with:
37+
token: ${{ secrets.NPM_TOKEN }}

.github/workflows/nightly.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: Nightly
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
5+
schedule:
6+
- cron: "0 0 * * *"
87

98
jobs:
109
check:
@@ -75,7 +74,7 @@ jobs:
7574
strategy:
7675
fail-fast: false
7776
matrix:
78-
database: [postgres, mysql, mariadb, mssql]
77+
test: [postgres, mysql, mariadb, mssql, unittest]
7978
steps:
8079
- name: Install toolchain
8180
uses: actions-rs/toolchain@v1
@@ -102,7 +101,7 @@ jobs:
102101
args: cargo-make
103102

104103
- name: Tests
105-
run: cargo make ${{ matrix.database }}
104+
run: cargo make ${{ matrix.test }}
106105

107106
docker:
108107
needs: [tests, clippy, check]

.github/workflows/release.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "server-*"
7+
8+
jobs:
9+
check:
10+
name: check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install toolchain
14+
uses: actions-rs/toolchain@v1
15+
with:
16+
toolchain: nightly
17+
override: true
18+
19+
- name: Checkout Sources
20+
uses: actions/checkout@v4
21+
22+
- name: Install Protoc
23+
uses: arduino/setup-protoc@v3
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Setup cache
28+
uses: Swatinem/rust-cache@v2
29+
30+
- name: Install cargo-make
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: install
34+
args: cargo-make
35+
36+
- name: Run check
37+
run: cargo make check
38+
39+
clippy:
40+
name: clippy
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Install toolchain
44+
uses: actions-rs/toolchain@v1
45+
with:
46+
toolchain: nightly
47+
override: true
48+
components: clippy
49+
profile: minimal
50+
51+
- name: Checkout Sources
52+
uses: actions/checkout@v4
53+
54+
- name: Install Protoc
55+
uses: arduino/setup-protoc@v3
56+
with:
57+
repo-token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Setup cache
60+
uses: Swatinem/rust-cache@v2
61+
62+
- name: Install cargo-make
63+
uses: actions-rs/cargo@v1
64+
with:
65+
command: install
66+
args: cargo-make
67+
68+
- name: Run clippy
69+
run: cargo make clippy
70+
71+
tests:
72+
name: tests
73+
runs-on: ubuntu-latest
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
test: [postgres, mysql, mariadb, mssql, unittest]
78+
steps:
79+
- name: Install toolchain
80+
uses: actions-rs/toolchain@v1
81+
with:
82+
toolchain: nightly
83+
override: true
84+
profile: minimal
85+
86+
- name: Checkout Sources
87+
uses: actions/checkout@v4
88+
89+
- name: Install Protoc
90+
uses: arduino/setup-protoc@v3
91+
with:
92+
repo-token: ${{ secrets.GITHUB_TOKEN }}
93+
94+
- name: Setup cache
95+
uses: Swatinem/rust-cache@v2
96+
97+
- name: Install cargo-make
98+
uses: actions-rs/cargo@v1
99+
with:
100+
command: install
101+
args: cargo-make
102+
103+
- name: Tests
104+
run: cargo make ${{ matrix.test }}
105+
106+
docker:
107+
needs: [tests, clippy, check]
108+
name: docker
109+
runs-on: ubuntu-latest
110+
steps:
111+
- name: Checkout Sources
112+
uses: actions/checkout@v4
113+
114+
- name: Extract version
115+
run: echo "VERSION=${GITHUB_REF#refs/tags/server-}" >> $GITHUB_ENV
116+
117+
- name: Login into repository
118+
uses: docker/login-action@v3
119+
with:
120+
registry: ghcr.io
121+
username: ${{ github.actor }}
122+
password: ${{ secrets.GITHUB_TOKEN }}
123+
124+
- name: Build and push Docker image
125+
uses: docker/build-push-action@v6
126+
with:
127+
context: .
128+
push: true
129+
tags: ghcr.io/onelitefeathernet/feedback-fusion:${env.VERSION},ghcr.io/onelitefeathernet/feedback-fusion:latest

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,3 @@ all-databases = ["postgres", "mysql", "mssql"]
6565
postgres = ["rbdc-pg"]
6666
mysql = ["rbdc-mysql"]
6767
mssql = ["rbdc-mssql"]
68-
69-
test = []

0 commit comments

Comments
 (0)