Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #118 from iden3/feature/ios-binding-action
Browse files Browse the repository at this point in the history
Add action to bindo Go to iOS and release it
  • Loading branch information
ed255 authored May 27, 2020
2 parents 7ed1666 + fbe3f23 commit 5d1d883
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .github/workflows/gomobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- go/**

jobs:
build:
bind-go-android:
name: Gomobile
runs-on: ubuntu-latest
steps:
Expand All @@ -16,7 +16,7 @@ jobs:
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Build
id: build
id: bind-android
run: |
mkdir -p /tmp/builds
docker pull ed255/gomobile-android:API29-noemu
Expand Down Expand Up @@ -71,8 +71,8 @@ jobs:
tag_name: ${{ steps.next_version.outputs.version }}
release_name: Release ${{ steps.next_version.outputs.version }}
body: |
* SHA256 (iden3mobile.aar) = `${{ steps.build.outputs.sha256_aar }}`
* SHA256 (iden3mobile-sources.jar) = `${{ steps.build.outputs.sha256_jar }}`
* SHA256 (iden3mobile.aar) = `${{ steps.bind-android.outputs.sha256_aar }}`
* SHA256 (iden3mobile-sources.jar) = `${{ steps.bind-android.outputs.sha256_jar }}`
draft: false
prerelease: true

Expand Down Expand Up @@ -105,4 +105,37 @@ jobs:
cd /tmp/builds/out
mvn deploy:deploy-file -Dfile=iden3mobile.aar -Durl=https://maven.pkg.github.com/iden3/iden3-mobile -DrepositoryId=github -DrepositoryName="GitHub Pages" -Dfiles=iden3mobile-sources.jar -Dtypes=jar -Dclassifiers=sources -DgroupId=com.iden3 -DartifactId=iden3mobile -Dversion="${{ steps.next_version.outputs.version }}" -Dpackaging=aar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

bind-go-ios:
name: Test Go
runs-on: macos-latest
steps:

- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14

- name: Bind to iOS
run: |
go get golang.org/x/mobile/cmd/gomobile
PATH=$PATH:/Users/runner/go/bin
export PATH
cd go/iden3mobile
mkdir -p /tmp/build
gomobile init
gomobile bind --target ios -o /tmp/build/Iden3mobile.framework
- name: Release framework
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /tmp/build/Iden3mobile.framework
asset_name: Iden3mobile.framework
asset_content_type: application/zip

0 comments on commit 5d1d883

Please sign in to comment.