-
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (73 loc) · 2.36 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build dRAGon Project
on: push
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: microsoft
java-version: 17
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.7
- name: Display Tools Versions
run: gradle issueReportInfo
- name: Create Release
if: github.ref == 'refs/heads/main'
run: gradle createRelease
- name: Set Frontend Version
run: npm version from-git --no-git-tag-version --prefix frontend
- name: Set Docs Version
run: npm version from-git --no-git-tag-version --prefix docs
- name: Test dRAGon
run: gradle npmInstall npmLint checkstyleMain checkstyleTest test
- name: Build Documentation
run: npm install --prefix docs && npm run build --prefix docs
- name: Build dRAGon
run: gradle bootJar -Pversion=$(gradle cV -q -Prelease.quiet)
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Meta Data
id: meta
uses: docker/metadata-action@v5
with:
images: |
dragon-okinawa/dragon
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push Release
if: github.ref == 'refs/heads/main'
run: gradle pushRelease
- name: Deploy Documentation
uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/main'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/build