Skip to content

Commit 09e610c

Browse files
authored
Update build.yml
1 parent b921baf commit 09e610c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/build.yml

+17
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,30 @@ jobs:
1919
- uses: actions/setup-java@v1
2020
with:
2121
java-version: 1.11
22+
23+
- name: Hent maven version
24+
run: |
25+
echo "::set-env name=MVN_VERSION::$(mvn help:evaluate -Dsha1=${TAG} -Dexpression=project.version -q -DforceStdout)"
26+
2227
- name: Build artifacts & deploy
2328
shell: bash
2429
run: |
30+
mvn versions:set -DnewVersion=${MVN_VERSION}
2531
mvn deploy sonar:sonar -e --batch-mode --settings ./.github/.m2/settings.xml --file pom.xml -Dmaven.wagon.http.pool=false -Dchangelist= -Dsha1=-$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')-$(echo $GITHUB_SHA | cut -c1-7) -Dfile.encoding=UTF-8 -Dsonar.projectKey="navikt_fp-tidsserie" -Dsonar.login=${SONAR_TOKEN}
2632
env:
2733
GITHUB_USERNAME: x-access-token
2834
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
2935
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3036
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
key:
38+
- name: Create Release
39+
id: create_release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ env.MVN_VERSION }}
45+
release_name: Release ${{ env.MVN_VERSION }}
46+
draft: false
47+
prerelease: false
3148

0 commit comments

Comments
 (0)