Skip to content

Build

Build #1340

Workflow file for this run

name: Build
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
build:
name: Maven Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build weasis-i18n-dist
run: |
mvn -B clean install -Dtransifex.token=${{ secrets.TRANSIFEX_TOKEN }} -f main
- name: Checkout mvn-repo repository
uses: actions/checkout@v3
with:
repository: nroduit/mvn-repo
path: mvn-repo
token: ${{ secrets.API_TOKEN_GITHUB }}
- name: Commit the maven packages
run: |
cd mvn-repo
declare -a PKGFOLDERS=("org/weasis/weasis-i18n-dist/4.0.0-SNAPSHOT")
for PKGFOLDER in ${PKGFOLDERS[@]}; do
mkdir -p ${PKGFOLDER}
cp -v ~/.m2/repository/${PKGFOLDER}/weasis-*.war ${PKGFOLDER}
cp -v ~/.m2/repository/${PKGFOLDER}/weasis-*.war ${PKGFOLDER}/weasis-i18n.war
cp -v ~/.m2/repository/${PKGFOLDER}/weasis-*.zip ${PKGFOLDER}
IFS=$'\n'
paths=($(find ${PKGFOLDER} -name "*.war" -o -name "*.zip"))
unset IFS
for file in ${paths[@]}; do
$(sha1sum "${file}" | awk '{printf $1}' > "${file}".sha1)
$(md5sum "${file}" | awk '{printf $1}' > "${file}".md5)
done
done
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "update weasis-i18n-dist"
git push