Skip to content

Commit f95cc9f

Browse files
authored
Release 16.3.0
2 parents 6697560 + 0e51448 commit f95cc9f

95 files changed

Lines changed: 9578 additions & 2195 deletions

File tree

Some content is hidden

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

.github/workflows/delete_all_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
delete-all-images:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/delete-package-versions@v4
10+
- uses: actions/delete-package-versions@v5
1111
with:
1212
# Name of the package.
1313
# Required

.github/workflows/deploy.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- hotfix
8+
- develop
9+
- early-access
10+
11+
concurrency:
12+
group: deploy-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
uses: ./.github/workflows/test.yml
18+
19+
docker:
20+
needs: test
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
platform:
26+
- linux/amd64
27+
- linux/arm64
28+
outputs:
29+
version: ${{ steps.package-version.outputs.current-version }}
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: "${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/hotfix' && 0 || 1 }}"
35+
36+
- name: Fetch Current Package Version
37+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/hotfix' || github.ref == 'refs/heads/develop'
38+
id: package-version
39+
uses: martinbeentjes/npm-get-version-action@v1.3.1
40+
41+
- name: Set up QEMU
42+
uses: docker/setup-qemu-action@v3
43+
44+
- name: Set up Docker Buildx
45+
uses: docker/setup-buildx-action@v3
46+
47+
- name: Login to Docker Hub
48+
uses: docker/login-action@v3
49+
with:
50+
username: phalcode
51+
password: ${{ secrets.DOCKERHUB_TOKEN }}
52+
53+
- name: Login to GitHub Container Registry
54+
uses: docker/login-action@v3
55+
with:
56+
registry: ghcr.io
57+
username: phalcode
58+
password: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- name: Build and Push by digest
61+
id: build
62+
uses: docker/build-push-action@v6
63+
with:
64+
platforms: ${{ matrix.platform }}
65+
tags: |
66+
phalcode/gamevault-backend
67+
ghcr.io/phalcode/gamevault-backend
68+
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
69+
cache-from: type=gha
70+
cache-to: type=gha,mode=max
71+
72+
- name: Export digest
73+
run: |
74+
mkdir -p /tmp/digests
75+
digest="${{ steps.build.outputs.digest }}"
76+
touch "/tmp/digests/${digest#sha256:}"
77+
78+
- name: Upload digest
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: digests-${{ strategy.job-index }}
82+
path: /tmp/digests/*
83+
if-no-files-found: error
84+
retention-days: 1
85+
86+
manifest:
87+
needs: docker
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Download digests
91+
uses: actions/download-artifact@v4
92+
with:
93+
path: /tmp/digests
94+
pattern: digests-*
95+
merge-multiple: true
96+
97+
- name: Set up Docker Buildx
98+
uses: docker/setup-buildx-action@v3
99+
100+
- name: Login to Docker Hub
101+
uses: docker/login-action@v3
102+
with:
103+
username: phalcode
104+
password: ${{ secrets.DOCKERHUB_TOKEN }}
105+
106+
- name: Login to GitHub Container Registry
107+
uses: docker/login-action@v3
108+
with:
109+
registry: ghcr.io
110+
username: phalcode
111+
password: ${{ secrets.GITHUB_TOKEN }}
112+
113+
- name: Create manifest list and push
114+
run: |
115+
BRANCH="${GITHUB_REF#refs/heads/}"
116+
VERSION="${{ needs.docker.outputs.version }}"
117+
118+
push_manifest() {
119+
local REPO=$1
120+
local TAGS=$2
121+
local ARGS=""
122+
for tag in $TAGS; do
123+
ARGS="$ARGS -t $REPO:$tag"
124+
done
125+
126+
docker buildx imagetools create $ARGS \
127+
$(printf "$REPO@sha256:%s " $(ls /tmp/digests))
128+
}
129+
130+
case "$BRANCH" in
131+
master|hotfix)
132+
push_manifest "phalcode/gamevault-backend" "latest $VERSION"
133+
push_manifest "ghcr.io/phalcode/gamevault-backend" "latest $VERSION"
134+
;;
135+
develop)
136+
push_manifest "phalcode/gamevault-backend" "unstable"
137+
push_manifest "ghcr.io/phalcode/gamevault-backend" "unstable"
138+
;;
139+
early-access)
140+
push_manifest "phalcode/gamevault-backend" "early-access"
141+
push_manifest "ghcr.io/phalcode/gamevault-backend" "early-access"
142+
;;
143+
esac
144+
145+
- name: Create Github Tag & Release
146+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/hotfix'
147+
id: release
148+
uses: CupOfTea696/gh-action-auto-release@v1.0.2
149+
env:
150+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151+
152+
- name: Discord notification
153+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/hotfix'
154+
uses: Ilshidur/action-discord@master
155+
env:
156+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_BOT_WEBHOOK }}
157+
with:
158+
args: "<@&1128857090090340382> New Release: {{ EVENT_PAYLOAD.repository.full_name }} v$VERSION has been deployed. Here are the changes: https://github.com/{{ EVENT_PAYLOAD.repository.full_name }}/releases/tag/$VERSION"
159+
160+
sonarcloud:
161+
needs: test
162+
if: github.ref == 'refs/heads/develop'
163+
runs-on: ubuntu-latest
164+
steps:
165+
- uses: actions/checkout@v4
166+
with:
167+
fetch-depth: 0
168+
- name: SonarCloud Scan
169+
uses: SonarSource/sonarcloud-github-action@master
170+
env:
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/deployment-develop.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/deployment-early-access.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/deployment-master.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches: [develop, master]
6+
workflow_call:
7+
8+
concurrency:
9+
group: test-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
cache: "pnpm"
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Run tests with coverage
33+
run: pnpm test:cov
34+
35+
- name: Upload coverage report
36+
if: always()
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: coverage-report
40+
path: coverage/
41+
retention-days: 14

0 commit comments

Comments
 (0)