Skip to content

1.0.2

1.0.2 #5

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
services:
mariadb:
image: mariadb:10.5
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
env:
MYSQL_USER: testuser
MYSQL_PASSWORD: testpass
MYSQL_ROOT_PASSWORD: root
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Initialize MariaDB
env:
MARIADB_PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
echo "Creating databases"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE cfe_18 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE cfe_03 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE cfe_01 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE cfe_07 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE cfe_00 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE flow CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "CREATE DATABASE location CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on cfe_18.* to testuser@'%' identified by 'testpass';"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on cfe_03.* to testuser@'%' identified by 'testpass';"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on cfe_01.* to testuser@'%' identified by 'testpass';"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on cfe_07.* to testuser@'%' identified by 'testpass';"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on cfe_00.* to testuser@'%' identified by 'testpass';"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on flow.* to testuser@'%' identified by 'testpass';"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "grant all privileges on location.* to testuser@'%' identified by 'testpass';"
echo "Flushing privileges"
mysql -u root -h127.0.0.1 -p'root' -P${MARIADB_PORT} <<< "flush privileges;"
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
- name: Build war
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach war to release
uses: softprops/action-gh-release@v1
with:
files: |
target/cfe_18.war