-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding temporary github action for building and publishing
- Loading branch information
Matt
committed
Sep 26, 2023
1 parent
500aa40
commit 836c14c
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Java Leaflet Build | ||
# | ||
on: [ push ] | ||
# | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: Download and extract OpenOffice | ||
run: | | ||
# Define the OpenOffice version you want to download | ||
OO_VERSION=4.1.14 | ||
# Define the URL for the OpenOffice installation package | ||
OO_URL=https://downloads.apache.org/openoffice/${OO_VERSION}/binaries/en-US/Apache_OpenOffice_${OO_VERSION}_Linux_x86-64_install-deb_en-US.tar.gz | ||
# Create the target directory | ||
mkdir -p ~/tools/soffice/ | ||
# Download the OpenOffice package | ||
curl -L -o ~/tools/soffice/openoffice.tar.gz $OO_URL | ||
# Extract OpenOffice | ||
tar -xzf ~/tools/soffice/openoffice.tar.gz -C ~/tools/soffice/ | ||
# Install OpenOffice (you may need to adapt this step depending on your requirements) | ||
sudo dpkg -i ~/tools/soffice/en-US/DEBS/*.deb | ||
working-directory: ${{ github.workspace }} | ||
|
||
- name: Build | ||
env: | ||
jthumbnailer.openoffice.dir: /opt/openoffice4/ | ||
run: ./gradlew test | ||
|
||
publish: | ||
needs: [ "build" ] | ||
if: contains(github.ref_name, 'dev/') | ||
permissions: | ||
contents: read | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: Deploy to GitHub Packages | ||
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 | ||
with: | ||
arguments: publish | ||
env: | ||
GITHUB_USERNAME: makbn | ||
GITHUB_ACTOR: makbn | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |