Skip to content

Commit

Permalink
Merge pull request #3 from tyro/add-dependency-review
Browse files Browse the repository at this point in the history
Point dependency review workflow to main
  • Loading branch information
liaodaniel authored Jun 12, 2024
2 parents 717f791 + 529421a commit d9dd394
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
- name: Autobuild
uses: github/codeql-action/autobuild@v2
env:
GITHUB_PACKAGES_USER: ${{ github.actor }}
GITHUB_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PACKAGE_USER: ${{ github.actor }}
GH_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:

jobs:
review:
uses: tyro/gh-platform-technology-workflows/.github/workflows/dependency-review.yml@master
uses: tyro/gh-platform-technology-workflows/.github/workflows/dependency-review.yml@main
with:
build-tool: gradle
java-version: '11'
gradle-module: tyro-pay-android
gradle-configuration: 'releaseRuntimeClasspath'
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Publish aar to GitHub Packages
run: ./gradlew publish
env:
GITHUB_PACKAGES_USER: ${{github.actor}}
GITHUB_PACKAGES_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_PACKAGE_USER: ${{github.actor}}
GH_PACKAGE_TOKEN: ${{secrets.GITHUB_TOKEN}}


4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
- name: Publish aar to GitHub Packages
run: ./gradlew publish
env:
GITHUB_PACKAGES_USER: ${{github.actor}}
GITHUB_PACKAGES_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_PACKAGE_USER: ${{github.actor}}
GH_PACKAGE_TOKEN: ${{secrets.GITHUB_TOKEN}}



8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ This SDK supports easy integration of Tyro's Pay API in you Android app.
### Configuration
Store GitHub Packages Username

`export GITHUB_PACKAGES_USER={YOUR_GITHUB_USERNAME}`
`export GH_PACKAGE_USER={YOUR_GITHUB_USERNAME}`

Setup GitHub Personal Access Token (PAT)

* Follow this [GitHub guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) to generate a PAT with `read:packages` permission
* Store the new token as an environment variable:
`export GITHUB_PACKAGES_TOKEN={YOUR_GITHUB_TOKEN}`
`export GH_PACKAGE_TOKEN={YOUR_GITHUB_TOKEN}`


Add `tyro-pay-api-sdk-android` to your `build.gradle` dependencies.
Expand All @@ -38,8 +38,8 @@ repositories {
maven {
url = uri("https://maven.pkg.github.com/tyro/tyro-pay-api-sdk-android")
credentials {
username = System.getenv("GITHUB_PACKAGES_USER")
password = System.getenv("GITHUB_PACKAGES_TOKEN")
username = System.getenv("GH_PACKAGE_USER")
password = System.getenv("GH_PACKAGE_TOKEN")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ dependencyResolutionManagement {
maven {
url = uri("https://maven.pkg.github.com/tyro/tyro-pay-api-sdk-android")
credentials {
username = System.getenv("GITHUB_PACKAGES_USER") ?: System.getProperty("github.username")?.toString()
password = System.getenv("GITHUB_PACKAGES_TOKEN")
username = System.getenv("GH_PACKAGE_USER") ?: System.getProperty("github.username")?.toString()
password = System.getenv("GH_PACKAGE_TOKEN")
}
}

Expand Down
4 changes: 2 additions & 2 deletions tyro-pay-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ afterEvaluate {
name= 'GitHubPackages'
url = uri("https://maven.pkg.github.com/tyro/tyro-pay-api-sdk-android")
credentials {
username = System.getenv("GITHUB_PACKAGES_USER")
password = System.getenv("GITHUB_PACKAGES_TOKEN")
username = System.getenv("GH_PACKAGE_USER")
password = System.getenv("GH_PACKAGE_TOKEN")
}
}
}
Expand Down

0 comments on commit d9dd394

Please sign in to comment.