-
Notifications
You must be signed in to change notification settings - Fork 16
87 lines (82 loc) · 2.53 KB
/
release-server.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
85
86
87
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Release server
jobs:
build:
name: Create and upload release
runs-on: ubuntu-24.04
services:
database:
image: postgres:17.2-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: projektordb
TZ: UTC
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
objectstorage:
image: bitnami/minio:2020.12.29-debian-10-r17
ports:
- "9000:9000"
volumes:
- /tmp:/data
env:
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Set env
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:11})
- name: ui install
run: |
cd ui
yarn install
- name: Build project
env:
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
run: |
./gradlew :server:server-app:assembleFull -PreleaseVersion=${{ env.RELEASE_VERSION }}
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./server/server-app/build/libs/server-app-1.0-all.jar
asset_name: projektor-server-${{ env.RELEASE_VERSION }}.jar
asset_content_type: application/java-archive