Skip to content

Commit

Permalink
chore: pass secrets to new reusable workflows (#6087)
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-MikeS committed Nov 16, 2022
1 parent 7581201 commit f3c0462
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/publish-android.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
name: Publish Native Android Library

on: [workflow_dispatch, workflow_call]
on:
workflow_call:
secrets:
ANDROID_OSSRH_USERNAME:
required: true
ANDROID_OSSRH_PASSWORD:
required: true
ANDROID_SIGNING_KEY_ID:
required: true
ANDROID_SIGNING_PASSWORD:
required: true
ANDROID_SIGNING_KEY:
required: true
ANDROID_SONATYPE_STAGING_PROFILE_ID:
required: true
CAP_GH_RELEASE_TOKEN:
required: true
workflow_dispatch:

jobs:
publish-android:
runs-on: ubuntu-latest
Expand All @@ -9,7 +27,9 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: set up JDK 11
uses: actions/setup-java@v2
with:
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ on: workflow_dispatch
jobs:
publish-npm-latest:
uses: ./.github/workflows/publish-npm-latest.yml
secrets:
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-android:
needs: publish-npm-latest
uses: ./.github/workflows/publish-android.yml
uses: ./.github/workflows/publish-android.yml
secrets:
ANDROID_OSSRH_USERNAME: ${{ secrets.ANDROID_OSSRH_USERNAME }}
ANDROID_OSSRH_PASSWORD: ${{ secrets.ANDROID_OSSRH_PASSWORD }}
ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }}
ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }}
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
9 changes: 8 additions & 1 deletion .github/workflows/publish-npm-latest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Publish NPM Latest

on: [workflow_dispatch, workflow_call]
on:
workflow_call:
secrets:
CAP_GH_RELEASE_TOKEN:
required: true
NPM_TOKEN:
required: true
workflow_dispatch:

jobs:
deploy-npm-latest:
Expand Down

0 comments on commit f3c0462

Please sign in to comment.