Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added support for github actions #341

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 55 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ jobs:
runs-on: anoncreds-ubuntu-latest
needs: build-android-libraries
if: |
(github.event_name == 'release' ||
(github.event_name == 'push' ||
github.event_name == 'release' ||
(github.event_name == 'workflow_dispatch' &&
github.event.inputs.publish-binaries == 'true'))
steps:
Expand Down Expand Up @@ -439,7 +440,8 @@ jobs:
runs-on: macos-latest
needs: build-ios-libraries
if: |
(github.event_name == 'release' ||
(github.event_name == 'push' ||
github.event_name == 'release' ||
(github.event_name == 'workflow_dispatch' &&
github.event.inputs.publish-binaries == 'true'))
steps:
Expand Down Expand Up @@ -469,6 +471,57 @@ jobs:
x86_64-apple-ios
failOnError: false

alpha-release:
name: Alpha Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
id-token: write
runs-on: ubuntu-latest
env:
NPM_TAG: 'alpha'
needs:
- create-ios-xcframework
- create-android-library
defaults:
run:
working-directory: ./wrappers/javascript
timeout-minutes: 7
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: "yarn"
cache-dependency-path: "wrappers/javascript"
- name: install
run: yarn install --immutable

- name: Fetch Android libraries
uses: actions/download-artifact@v4
with:
name: android-libraries
path: packages/anoncreds-react-native/native/mobile/android/

- name: Fetch iOS Framework
uses: actions/download-artifact@v4
with:
name: indy_vdr.xcframework
path: packages/anoncreds-react-native/native/mobile/ios/

# On push to main, release unstable version
- name: Release alpha
run: |
git update-index --assume-unchanged $(find . -type d -name node_modules -prune -o -name 'package.json' -print | tr "\n" " ")
#export NEXT_VERSION_BUMP=$(yarn next-version-bump)
export NEXT_VERSION_BUMP="major"
npx lerna publish --no-verify-access --no-private --loglevel=verbose --canary $NEXT_VERSION_BUMP --dist-tag $NPM_TAG --force-publish --yes
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }}

create-ios-android-release-asset:
name: Create iOS and Android Release Assets
runs-on: anoncreds-ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions wrappers/javascript/lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.2.2",
"packages":["packages/anoncreds-nodejs", "packages/anoncreds-react-native", "packages/anoncreds-shared"],
"npmClient": "pnpm",
"command": {
"version": {
Expand Down
Copy link

@cvarjao cvarjao Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to remove @mapbox/node-pre-gyp, see GHA failure

Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,5 @@
"peerDependencies": {
"react": ">= 16",
"react-native": ">= 0.66.0"
},
"binary": {
"module_name": "anoncreds",
"module_path": "native",
"remote_path": "v0.2.0",
"host": "https://github.com/hyperledger/anoncreds-rs/releases/download/",
"package_name": "library-ios-android.tar.gz"
}
}
Loading
Loading