Skip to content

Commit

Permalink
upgrade: GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Jan 14, 2025
1 parent a950410 commit 91f7c94
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/develop-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish Development Build

permissions:
contents: write

on:
push:
branches:
- 'develop'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set up Maven cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean verify -U -P snapshot-build
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %Z')"
- name: Create tag name from date
id: tagdate
run: echo "::set-output name=tagdate::$(date +'%Y-%m-%d_%H-%M-%S_%Z')"
- name: Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.date.outputs.date }}
tag_name: ${{ steps.tagdate.outputs.tagdate }}
generate_release_notes: true
draft: false
prerelease: true
files: |
**/target/*.war
install/*
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@ jobs:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set up Maven cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean verify -U
- name: Rename WAR
run: mv target/*.war target/goobi.war
run: mvn clean verify -U -P release-build
- name: Release
id: create_release
uses: softprops/action-gh-release@v2
Expand All @@ -39,3 +38,4 @@ jobs:
prerelease: false
files: |
**/target/*.war
install/*

0 comments on commit 91f7c94

Please sign in to comment.