File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ name: Gradle Package
66on :
77 release :
88 types : [created]
9+ workflow_dispatch :
10+ inputs :
11+ version :
12+ description : " Version to publish (e.g., v0.1.0)"
13+ required : true
914
1015jobs :
1116 publish :
2732 - name : Setup Gradle
2833 uses : gradle/actions/setup-gradle@v4
2934
30- - name : Extract version from tag
35+ - name : Extract version from input or tag
3136 id : version
32- run : echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
37+ shell : bash
38+ run : |
39+ VERSION="${{ inputs.version }}"
40+ if [[ -z "$VERSION" ]]; then
41+ VERSION="$GITHUB_REF_NAME"
42+ fi
43+ echo "version=${VERSION#v}" >> $GITHUB_OUTPUT
3344
3445 - name : Build with Gradle
3546 working-directory : bindings/android
4051 working-directory : bindings/android
4152 env :
4253 GITHUB_ACTOR : ${{ github.actor }}
43- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+ GITHUB_TOKEN : ${{ secrets.ORG_PACKAGES_TOKEN }}
4455 GITHUB_REPO : ${{ github.repository }}
4556 run : ./gradlew publish -Pversion=${{ steps.version.outputs.version }}
Original file line number Diff line number Diff line change @@ -15,13 +15,12 @@ Create a GitHub PAT (Personal Access Token):
1515
1616Set env vars:
1717``` sh
18- export GITHUB_ACTOR=" your_pat_with_read "
18+ export GITHUB_ACTOR=" your_github_username "
1919export GITHUB_TOKEN=" your_pat_with_read:packages"
2020```
2121
2222Or add to ` ~/.gradle/gradle.properties ` :
2323``` properties
24- # ~/.gradle/gradle.properties
2524gpr.user =<your_github_username>
2625gpr.key =<your_pat_with_read:packages>
2726```
@@ -31,7 +30,6 @@ gpr.key=<your_pat_with_read:packages>
3130``` kotlin
3231// settings.gradle.kts
3332dependencyResolutionManagement {
34- repositoriesMode.set(RepositoriesMode .FAIL_ON_PROJECT_REPOS )
3533 repositories {
3634 google()
3735 mavenCentral()
@@ -56,6 +54,7 @@ dependencies {
5654 // implementation("com.synonym:bitkit-core-android:0.1.0")
5755}
5856```
57+
5958### Maven Local (development)
6059
6160``` kotlin
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ find "$TMP_DIR" -name "bitkitcore.kt" -exec mv {} "$BASE_DIR/" \;
139139# Clean up temp directory and any remaining uniffi directories
140140echo " Cleaning up temporary files..."
141141rm -rf " $TMP_DIR "
142- rm -rf " $BASE_DIR /uniffi"
142+ rm -rf " $ANDROID_LIB_DIR /uniffi"
143143
144144# Verify the file was moved correctly
145145if [ ! -f " $BASE_DIR /bitkitcore.kt" ]; then
You can’t perform that action at this time.
0 commit comments