Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fgnm committed Jan 28, 2024
1 parent b8ce009 commit e41d766
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: RELEASE Build

on:
workflow_dispatch

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Eclipse Temurin OpenJDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build JAR dist files
run: ./gradlew dist
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Release build deploy
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run:
./gradlew clean build publish -PRELEASE=true -Psigning.gnupg.keyId=${{ secrets.GPG_KEYID }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psigning.gnupg.keyName=${{ secrets.GPG_KEYID }}
41 changes: 41 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: SNAPSHOT Build

on:
push:
branches: [ master ]

jobs:
linux:
if: "!contains(github.event.head_commit.message, 'cd skip')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Eclipse Temurin OpenJDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build JAR dist files
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew dist -PSNAPSHOT=true
- name: Fix deb file names
run: mv build/lib/*.jar talos-legacy-SNAPSHOT.jar
- name: Upload jar artifact
uses: actions/upload-artifact@v2
with:
name: talos-legacy-SNAPSHOT.jar
path: talos-legacy-SNAPSHOT.jar
- name: Publish SNAPSHOT artifacts
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: ./gradlew build publish -PSNAPSHOT=true

0 comments on commit e41d766

Please sign in to comment.