Skip to content

Commit

Permalink
Setup GitHub actions (#32)
Browse files Browse the repository at this point in the history
* Build & release workflow is ready

* Removed Jenkins

* no  no-daemon

* New reposilite config
  • Loading branch information
oleanders authored Sep 5, 2022
1 parent 6e56a35 commit 18149c6
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 35 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build
on:
push:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8

- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
gradle-version: 4.10.2
arguments: clean build
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to Reposilite

on:
release:
types: [ published ]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set version
run: |
echo "RELEASE_VERSION=${TAG_NAME:1}" >> $GITHUB_ENV
env:
TAG_NAME: ${{github.event.release.tag_name}}

- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8

- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
gradle-version: 4.10.2
arguments: clean build publish -Pversion=${{env.RELEASE_VERSION}}
env:
REPOSILITE_USERNAME: ${{secrets.REPOSILITE_USERNAME}}
REPOSILITE_PASSWORD: ${{secrets.REPOSILITE_PASSWORD}}
30 changes: 0 additions & 30 deletions Jenkinsfile

This file was deleted.

8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jar {
sourceCompatibility = 1.8

repositories {
maven { url 'https://repo.fintlabs.no/releases' }
jcenter()
mavenLocal()
//jcenter()
maven {
url 'https://repo.fintlabs.no/releases'
}
}

apply from: 'https://raw.githubusercontent.com/FINTlibs/fint-buildscripts/v1.5.0/dependencies.gradle'
Expand Down Expand Up @@ -61,4 +59,4 @@ jacocoTestReport {

apply from: 'https://raw.githubusercontent.com/FINTlibs/fint-buildscripts/master/dependencyReport.gradle'

apply from: 'https://raw.githubusercontent.com/FINTLabs/fint-buildscripts/master/reposilite.gradle'
apply from: 'https://raw.githubusercontent.com/FINTLabs/fint-buildscripts/master/reposilite.fint.ga.gradle'

0 comments on commit 18149c6

Please sign in to comment.