Skip to content

Commit

Permalink
Add version tag action
Browse files Browse the repository at this point in the history
  • Loading branch information
ubhaller committed Sep 10, 2020
1 parent a567774 commit 834a684
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
- name: shasum
run: shasum -a 256 dpppt-backend-shared/target/dpppt-backend-shared.jar > dpppt-backend-shared/target/dpppt-backend-shared.sha256
run: shasum -a 256 dpppt-backend-shared/target/dpppt-backend-shared.jar > dpppt-backend-shared/target/dpppt-backend-shared.jar.sha256
shell: bash
- name: Create Snapshot Release
uses: ncipollo/release-action@v1
Expand All @@ -52,7 +52,7 @@ jobs:
with:
name: Snapshot Release ${{ github.ref }}
tag: SNAPSHOT
artifacts: "dpppt-backend-shared/target/dpppt-backend-shared.jar,dpppt-backend-shared/target/dpppt-backend-shared.sha256"
artifacts: "dpppt-backend-shared/target/dpppt-backend-shared.jar,dpppt-backend-shared/target/dpppt-backend-shared.jar.sha256"
body: |
Changes in this Release
- Snapshot release
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/tagged_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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-dp3t-shared", "username": "${{ github.actor }}", "password": "${{ github.token}}"}]'
repositories: '[{"id" : "github-dp3t-shared", "url" : "https://maven.pkg.github.com/DP-3T/dp3t-shared-backend"}]'
- name: Build with Maven
run: |
mvn install --file dpppt-backend-shared/pom.xml;
env:
GITHUB_TOKEN: ${{ github.token }}
TESTCONTAINERS_RYUK_DISABLED: true
- name: shasum
run: shasum -a 256 dpppt-backend-shared/target/dpppt-backend-shared.jar > dpppt-backend-shared/target/dpppt-backend-shared.jar.sha256
shell: bash
- name: "Create new release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
dpppt-backend-shared/target/dpppt-backend-shared.jar
dpppt-backend-shared/target/dpppt-backend-shared.jar.sha256

0 comments on commit 834a684

Please sign in to comment.