-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (51 loc) · 1.6 KB
/
release.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
on:
push:
tags:
- '*'
name: Create Release
jobs:
build:
name: Upload Release Assets
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Set up Node.js 12
uses: actions/setup-node@v4
with:
node-version: 12
- name: Build frontend
run: cd frontend && yarn install && CI=false yarn build
- name: Build backend
run: |
./gradlew buildGraph
./gradlew build -x buildGraph -x distTar -x distZip
env:
EVE_ROUTE_DB: jdbc:sqlite:/tmp/sqlite.db
EVE_ROUTE_CLIENT_ID:
EVE_ROUTE_CLIENT_SECRET:
EVE_ROUTE_CALLBACK:
- name: Get the version
id: get_version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
build/libs/eve-route-${{ env.RELEASE_VERSION }}.jar
build/libs/eve-route-${{ env.RELEASE_VERSION }}.war
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: docker build --no-cache -t tkhamez/eve-route:${{ env.RELEASE_VERSION }} .
- name: Publish Docker image
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u tkhamez --password-stdin
docker push tkhamez/eve-route:${{ env.RELEASE_VERSION }}