forked from lightningdevkit/ldk-node
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (45 loc) · 1.35 KB
/
publish-android.yml
File metadata and controls
52 lines (45 loc) · 1.35 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
name: Android Publish
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "Version to publish (e.g., v0.1.0)"
required: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Extract version from input or tag
id: version
shell: bash
run: |
VERSION="${{ inputs.version }}"
if [[ -z "$VERSION" ]]; then
VERSION="$GITHUB_REF_NAME"
fi
echo "version=${VERSION#v}" >> $GITHUB_OUTPUT
- name: Build with Gradle
working-directory: bindings/kotlin/ldk-node-android
run: ./gradlew build -Pversion=${{ steps.version.outputs.version }}
- name: Publish to GitHub Packages
working-directory: bindings/kotlin/ldk-node-android
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.ORG_PACKAGES_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
run: ./gradlew publish -Pversion=${{ steps.version.outputs.version }}