Skip to content

Commit b7b387d

Browse files
Create release-kontrakt.yml
1 parent 7243144 commit b7b387d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish kontrakt
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build:
8+
name: Bygg pull-request
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-java@v1
14+
with:
15+
java-version: 1.11
16+
17+
- name: Set cache key
18+
run: |
19+
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
20+
echo "PREVIOUS_CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
21+
- uses: actions/cache@v2
22+
with:
23+
path: ~/.m2
24+
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
25+
restore-keys: |
26+
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
27+
28+
- name: Publish artifacts
29+
shell: bash
30+
run: |
31+
mvn deploy -e --batch-mode --file pom.xml -DtrimStackTrace=false -Dchangelist= -Dsha1= -Drevision=$NEW_VERSION -Dfile.encoding=UTF-8 -DdeployAtEnd=true
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
34+
NEW_VERSION: ${{ github.event.release.tag_name }}

0 commit comments

Comments
 (0)