-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from passageidentity/PSG-5172
PSG-5172
- Loading branch information
Showing
6 changed files
with
112 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Publish Flex Package | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
|
||
- name: Set up GPG | ||
env: | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
run: | | ||
echo "${GPG_PRIVATE_KEY}" | gpg --batch --import | ||
echo "signing.gnupg.keyName=${GPG_KEY_ID}" >> gradle.properties | ||
echo "signing.gnupg.passphrase=${GPG_PASSPHRASE}" >> gradle.properties | ||
- name: Publish to Maven Central | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_TOKEN_ID }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
run: ./gradlew :passageflex:publish | ||
|
||
- name: Wait for Staging Repository to be Created | ||
run: sleep 60 | ||
|
||
- name: Install xmllint | ||
run: sudo apt-get install -y libxml2-utils | ||
|
||
- name: Get Staging Repository ID | ||
id: get_repo_id | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_TOKEN_ID }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
run: | | ||
response=$(curl -u ${{ secrets.OSSRH_USERNAME }}:${{ secrets.OSSRH_PASSWORD }} -X GET "https://s01.oss.sonatype.org/service/local/staging/profile_repositories") | ||
echo "Response: $response" | ||
repo_id=$(echo ${response} | xmllint --xpath "string(//stagingProfileRepository/repositoryId)" -) | ||
echo "Repository ID: $repo_id" | ||
echo "::set-output name=repo_id::$repo_id" | ||
- name: Close and Release Repository | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_TOKEN_ID }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
OSSRH_PROFILE_ID: ${{ secrets.OSSRH_PROFILE_ID }} | ||
run: | | ||
repo_id=${{ steps.get_repo_id.outputs.repo_id }} | ||
close_xml=" | ||
<promoteRequest> | ||
<data> | ||
<stagedRepositoryId>"${repo_id}"</stagedRepositoryId> | ||
</data> | ||
</promoteRequest>" | ||
echo "Close XML: ${close_xml}" | ||
curl -u ${OSSRH_USERNAME}:${OSSRH_PASSWORD} \ | ||
-X POST https://s01.oss.sonatype.org/service/local/staging/profiles/${OSSRH_PROFILE_ID}/finish \ | ||
-H "Content-Type: application/xml" \ | ||
-d "${close_xml}" | ||
# Wait for repository to close | ||
sleep 120 | ||
promote_xml=" | ||
<promoteRequest> | ||
<data> | ||
<stagedRepositoryId>"${repo_id}"</stagedRepositoryId> | ||
</data> | ||
</promoteRequest>" | ||
echo "Promote XML: ${promote_xml}" | ||
curl -u ${OSSRH_USERNAME}:${OSSRH_PASSWORD} \ | ||
-X POST https://s01.oss.sonatype.org/service/local/staging/profiles/${OSSRH_PROFILE_ID}/promote \ | ||
-H "Content-Type: application/xml" \ | ||
-d "${promote_xml}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
passageflex/src/main/java/id/passage/passageflex/models/PasskeyCreationOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package id.passage.passageflex.models | ||
|
||
import id.passage.android.passageflex.model.AuthenticatorAttachment | ||
|
||
data class PasskeyCreationOptions( | ||
val authenticatorAttachment: AuthenticatorAttachment, | ||
) |