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

chore: pass secrets to new reusable workflows #6087

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
with:
carlpoole marked this conversation as resolved.
Show resolved Hide resolved
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