This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the publishing to gpr and release pipeline
- Loading branch information
1 parent
d6ab025
commit 97f7fb7
Showing
2 changed files
with
113 additions
and
13 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,66 @@ | ||
name: Release | ||
on: | ||
# push: | ||
# tags: | ||
# - 'v*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
name: Release Openfeature SDK | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cache Gradle and wrapper | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Set up JDK 12 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 12 | ||
|
||
- name: Grant Permission for Gradlew to Execute | ||
run: chmod +x gradlew | ||
|
||
- name: Build AAR ⚙️🛠 | ||
run: bash ./gradlew :openfeature:assemble | ||
|
||
- name: Publish to GitHub Package Registry 🚀 | ||
run: bash ./gradlew :openfeature:publish | ||
env: | ||
# todo, change this to something more generic | ||
# check if we can use the spotify account for this | ||
GPR_USER: vahidlazio | ||
GPR_KEY: ${{ secrets.TOKEN_PUBLISH }} | ||
|
||
- name: Create Release ✅ | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_PUBLISH }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Upload Openfeature SDK AAR 🗳 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_PUBLISH }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: OpenFeature/build/outputs/aar/OpenFeature-release.aar | ||
asset_name: openfeature-sdk.aar | ||
asset_content_type: application/aar |
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