Skip to content

Commit

Permalink
Merge pull request #142 from opensrp/ci-cd-automated-release
Browse files Browse the repository at this point in the history
init ci-cd automated release
  • Loading branch information
ndegwamartin committed Aug 30, 2022
2 parents e562422 + 14525fa commit 9dc6cdd
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
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/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

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

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

- 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 -Dmaven.javadoc.skip=true

- name: Github Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
[![Build Status](https://travis-ci.org/OpenSRP/opensrp-plan-evaluator.svg?branch=master)](https://travis-ci.org/OpenSRP/opensrp-plan-evaluator) [![Coverage Status](https://coveralls.io/repos/github/OpenSRP/opensrp-plan-evaluator/badge.svg?branch=master)](https://coveralls.io/github/OpenSRP/opensrp-plan-evaluator?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/97b0f387f0fa484caffea641f4762fbe)](https://www.codacy.com/app/OpenSRP/opensrp-plan-evaluator?utm_source=github.com&utm_medium=referral&utm_content=OpenSRP/opensrp-plan-evaluator&utm_campaign=Badge_Grade)

OpenSRP library that evaluates plans actions for task generation

## 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)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<artifactId>opensrp-plan-evaluator</artifactId>
<packaging>jar</packaging>
<version>1.6.7-SNAPSHOT</version>
<version>1.6.8-SNAPSHOT</version>
<name>OpenSRP Plan Evaluator</name>
<description>OpenSRP Plan Evaluator Library</description>
<url>https://github.com/OpenSRP/opensrp-plan-evaluator</url>
Expand Down

0 comments on commit 9dc6cdd

Please sign in to comment.