Skip to content

release

release #25

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'release version'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- 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 "[email protected]"
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/scala-2.13/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: .
push: true
tags: maif/izanami:${{ github.event.inputs.releaseVersion }}