-
Notifications
You must be signed in to change notification settings - Fork 962
59 lines (56 loc) · 1.88 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
push:
tags:
- 'v*'
name: Create Release
defaults:
run:
shell: bash
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
- name: Build artifacts
run: ./gradlew :btrace-dist:build
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: false
files: |
btrace-dist/build/distributions/btrace-${{ steps.branch_name.outputs.SOURCE_TAG }}-bin.tar.gz
btrace-dist/build/distributions/btrace-${{ steps.branch_name.outputs.SOURCE_TAG }}-bin.zip
btrace-dist/build/distributions/btrace-${{ steps.branch_name.outputs.SOURCE_TAG }}-sdkman-bin.zip
- name: Deploy Maven
id: deploy_maven
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PWD: ${{ secrets.GPG_SIGNING_PWD }}
BTRACE_SONATYPE_USER: ${{ secrets.BTRACE_SONATYPE_USER }}
BTRACE_SONATYPE_PWD: ${{ secrets.BTRACE_SONATYPE_PWD }}
run: |
./gradlew :btrace-dist:publishAllPublicationsToMavenRepository
- name: Update SDKMan!
id: update_sdkman
env:
SKDMAN_API_KEY: ${{ secrets.SDKMAN_KEY }}
SDKMAN_API_TOKEN: ${{ secrets.SDKMAN_TOKEN }}
run: |
./gradlew :btrace-dist:sdkMinorRelease