Skip to content

Commit

Permalink
Add CI/CD Release workflow-configuration file (#593)
Browse files Browse the repository at this point in the history
* Configure Automated CI Releases for Library Snapshots
- Add Release configuration file  
- Add documentation
  • Loading branch information
ndegwamartin authored Aug 1, 2022
1 parent 21bd3b1 commit f9e120d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 Release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-[0-9a-zA-Z]+-SNAPSHOT

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Cancel previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Decode & Generate Settings.xml file
run: echo $SETTINGS_FILE | base64 -di > ~/.m2/settings.xml
env:
SETTINGS_FILE: ${{ secrets.SETTINGS_XML }}

- name: Generate & upload library snapshot artifact JAR (Java Archive) file
run: mvn clean deploy -Dmaven.test.skip=true --no-transfer-progress

- name: Github Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# opensrp-server-core

[![Build Status](https://travis-ci.org/OpenSRP/opensrp-server-core.svg?branch=master)](https://travis-ci.org/OpenSRP/opensrp-server-core)
![Build Status](https://github.com/opensrp/opensrp-server-core/actions/workflows/ci.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/opensrp/opensrp-server-core/badge.svg?branch=v2)](https://coveralls.io/github/opensrp/opensrp-server-core?branch=v2)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/97b0f387f0fa484caffea641f4762fbe)](https://www.codacy.com/app/OpenSRP/opensrp-server-core?utm\_source=github.com\&utm\_medium=referral\&utm\_content=OpenSRP/opensrp-server-core\&utm\_campaign=Badge\_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a149805a96c547acaa3bca1d25858e0b)](https://www.codacy.com/gh/opensrp/opensrp-server-core/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OpenSRP/opensrp-server-core&utm_campaign=Badge_Grade)

Postgres, couchdb, lucene and scheduler domain objects, repositories and services

Expand Down Expand Up @@ -33,3 +33,7 @@ When an integration test is run/executed:
* Test-Containers will then provide a dynamic port to connect to, from the hosts network.
* A single instance is created for all the tests.
* The docker container will be killed once all the tests have been executed.

## Publishing artifacts

For more on publishing this artifact see [Publishing via Tag](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/3013902337/How+to+set+up+Server+Library+artifact+CI+CD+on+Github#Publishing-via-TAG)

0 comments on commit f9e120d

Please sign in to comment.