-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.3 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
name: Build and Publish SDK
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '^1.22.4'
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: 'gradle'
- name: Derive version from tag
id: set-version
run: |
# github.ref_name might be "v1.0.0"
VERSION="${GITHUB_REF_NAME#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build SDK
run: |
echo "Building Lantern SDK version $VERSION"
make build-sdk VERSION=$VERSION
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
name: "Release ${{ github.ref_name }}"
body: "Automated release for version ${{ env.VERSION }}"
artifacts: "build/lanternsdk-android-${{ env.VERSION }}.aar"
artifact_content_type: "application/zip"