-
Notifications
You must be signed in to change notification settings - Fork 43
74 lines (72 loc) · 2.46 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'release version'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.2.0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- uses: coursier/cache-action@v5
# install node lts
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'npm'
cache-dependency-path: izanami-frontend/package-lock.json
- name: build frontend
run: |
cd izanami-frontend
npm ci
npm run build
- name: build backend
run: sbt "set test in assembly := {}" clean assembly
- name: release
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
run: |
echo $PGP_SECRET | base64 --decode | gpg --batch --import 2> /dev/null
git checkout .
git config --global user.email "izanami-release-bot@users.noreply.github.com"
git config --global user.name "izanami-release-bot"
sbt "release release-version ${{ github.event.inputs.releaseVersion }} with-defaults skip-tests"
- name: github release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.event.inputs.releaseVersion }}
files: |
target/izanami.jar
- name: Set up Docker Build
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: maif/izanami:${{ github.event.inputs.releaseVersion }}
- name: Build and push demo image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: {context}/demo-docker-image/Dockerfile-pg-embeded
tags: maif/izanami-test-standalone:${{ github.event.inputs.releaseVersion }}