Skip to content

Commit

Permalink
add tagged_release workflow (#137)
Browse files Browse the repository at this point in the history
* add tagged_release workflow

* change everything into one file

* cahnge back to two

* single quotes

* test run
  • Loading branch information
ubamrein authored Jun 4, 2020
1 parent 7f9508d commit 97637ec
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/tagged_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will build a Java project with Maven when a tag is pushed
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
---
name: Java CI with Maven
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- run: echo ::set-env name=PULL_NUMBER::$(echo "$GITHUB_REF" | awk -F / '{print $3}')
shell: bash
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11.0.7
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file: :
- name: 'Create settings.xml'
uses: whelk-io/maven-settings-xml-action@v4
with:
servers: '[{"id": "github", "username": "${{ github.actor }}", "password": "${{ github.token}}"}, {"id": "github-annotation", "username": "${{ github.actor }}", "password": "${{ github.token }}"}]'
repositories: '[{"id" : "github", "url" : "https://maven.pkg.github.com/Ubique-OSS/springboot-swagger3"}, {"id" : "github-annotation", "url" : "https://maven.pkg.github.com/Ubique-OSS/springboot-swagger3-annotations"}]'
- name: Build with Maven
run: |
mvn install --file dpppt-backend-sdk/pom.xml;
mvn springboot-swagger-3:springboot-swagger-3 -f dpppt-backend-sdk/dpppt-backend-sdk-ws/pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}
TESTCONTAINERS_RYUK_DISABLED: true
- name: "Create new release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
dpppt-backend-sdk/dpppt-backend-sdk-ws/target/dpppt-backend-sdk-ws-*-SNAPSHOT.jar
dpppt-backend-sdk/dpppt-backend-sdk-ws/generated/swagger/swagger.yaml

0 comments on commit 97637ec

Please sign in to comment.