-
Notifications
You must be signed in to change notification settings - Fork 96
105 lines (101 loc) · 3.62 KB
/
release.yml
File metadata and controls
105 lines (101 loc) · 3.62 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Release
on:
schedule:
# 2 AM on Sunday
- cron: "0 2 * * 0"
workflow_dispatch:
concurrency:
group: release
cancel-in-progress: false
jobs:
isthmus-native-image-mac-linux:
name: Build Isthmus Native Image
if: github.repository == 'substrait-io/substrait-java'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-java@v5
with:
java-version: 25
distribution: graalvm
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Report Java Version
run: java -version
- name: Build with Gradle
run: |
# fetch submodule tags since actions/checkout@v6 does not
git submodule foreach 'git fetch --unshallow || true'
./gradlew nativeCompile
- name: Smoke Test
run: |
./isthmus-cli/src/test/script/smoke.sh
./isthmus-cli/src/test/script/tpch_smoke.sh
- name: Rename the artifact to OS-unique name
shell: bash
run: |
value=`mv isthmus-cli/build/native/nativeCompile/isthmus isthmus-cli/build/native/nativeCompile/isthmus-${{ matrix.os }}`
- name: Publish artifact
uses: actions/upload-artifact@v7
with:
name: isthmus-${{ matrix.os }}
path: isthmus-cli/build/native/nativeCompile/isthmus-${{ matrix.os }}
semantic-release:
if: github.repository == 'substrait-io/substrait-java'
runs-on: ubuntu-latest
needs: isthmus-native-image-mac-linux
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ secrets.RELEASER_ID }}
private-key: ${{ secrets.RELEASER_KEY }}
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
persist-credentials: false
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: "17"
distribution: "temurin"
- uses: actions/setup-node@v6
with:
node-version: "20"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Download isthmus-ubuntu-latest binary
uses: actions/download-artifact@v8
with:
name: isthmus-ubuntu-latest
path: native/libs
- name: Download isthmus-macOS-latest binary
uses: actions/download-artifact@v8
with:
name: isthmus-macOS-latest
path: native/libs
- name: Get bot user ID
id: bot-user-id
run: |
echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Run semantic-release
run: ./ci/release/run.sh
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GIT_AUTHOR_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
GIT_COMMITTER_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
MAVENCENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_KEY }}