forked from spinnaker/kork
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.51 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
JFROG_ARGS: --fail=false --url https://armory.jfrog.io/armory/ --user ${{secrets.ARTIFACTORY_USER}} --password ${{secrets.ARTIFACTORY_PASSWORD}}
GRADLE_ARGS: -Partifactory_user=${{secrets.ARTIFACTORY_USER}} -Partifactory_password=${{secrets.ARTIFACTORY_PASSWORD}}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
cache: 'gradle'
- name: Assemble release info
id: release_info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. .github/workflows/release_info.sh ${{ github.event.repository.full_name }}
echo CHANGELOG=$(echo -e "${CHANGELOG}") >> $GITHUB_OUTPUT
echo SKIP_RELEASE="${SKIP_RELEASE}" >> $GITHUB_OUTPUT
echo IS_CANDIDATE="${IS_CANDIDATE}" >> $GITHUB_OUTPUT
echo RELEASE_VERSION="${RELEASE_VERSION}" >> $GITHUB_OUTPUT
- name: Publish Release
run: |
./gradlew test final artifactoryPublish $GRADLE_ARGS
BUILD_NUMBER=$(./gradlew -Prelease.useLastTag=true $GRADLE_ARGS printVersion|grep VERSION|awk -F: '{print $2}')
echo "Running build scan against $BUILD_NUMBER"
jfrog rt bs "kork" "$BUILD_NUMBER" $JFROG_ARGS