Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
manudevelopia committed Dec 3, 2023
1 parent 3ff196f commit f0ed68a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

name: Build

on:
push:
branches:
- '**'
tags-ignore:
- '**'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'corretto'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew build
- name: Create Secret File
run: |
echo -n "${{ secrets.GRADLE_PROPERTIES }}" | base64 --decode > ~/.gradle/gradle.properties
echo -n "${{ secrets.SIGNING_SECRET_KEY_RING_CONTENT }}" | base64 --decode > ~/.gradle/secring.gpg
- name: Publish Snapshot
run: ./gradlew publishToSonatype
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

name: Publish package to GitHub Packages

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 17
- name: Publish package
run: ./gradlew -Pversion=${{ github.event.release.tag_name }} build publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f0ed68a

Please sign in to comment.