Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from MeasureAuthoringTool/develop
Browse files Browse the repository at this point in the history
MAT-5591: Adding repo publishing
  • Loading branch information
gregory-akins authored May 4, 2023
2 parents 7f3c12a + 0d18984 commit e46a5ef
Show file tree
Hide file tree
Showing 18 changed files with 94 additions and 212 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify

publish-snapshot:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'

- name: Extract project version
run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
id: project

# publish snapshot iff the project version in pom.xml contains '-SNAPSHOT'
- name: Publish SNAPSHOT version to GitHub Packages
if: contains(steps.project.outputs.version, '-SNAPSHOT')
run: mvn -B --no-transfer-progress deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '16'

- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: |
### Things that changed in this release(Changelog)
${{ steps.tag_version.outputs.changelog }}
- name: Publish release to GitHub Packages
run: mvn -B --no-transfer-progress deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
target/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
.classpath
.project
.settings


### macOs files
.DS_Store
src/.DS_Store
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>gov.cms.madie</groupId>
<artifactId>serviceUtil</artifactId>
<artifactId>service-util</artifactId>
<version>1.0-SNAPSHOT</version>

<name>serviceUtil</name>
Expand Down

This file was deleted.

132 changes: 0 additions & 132 deletions target/classes/META-INF/maven/gov.cms.madie/serviceUtil/pom.xml

This file was deleted.

Binary file removed target/classes/gov/cms/madie/serviceUtil/App.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions target/maven-archiver/pom.properties

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file removed target/serviceUtil-1.0-SNAPSHOT.jar
Binary file not shown.
56 changes: 0 additions & 56 deletions target/surefire-reports/TEST-gov.cms.madie.serviceUtil.AppTest.xml

This file was deleted.

4 changes: 0 additions & 4 deletions target/surefire-reports/gov.cms.madie.serviceUtil.AppTest.txt

This file was deleted.

Binary file not shown.

0 comments on commit e46a5ef

Please sign in to comment.