-
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.
add release pipeline and publishing using gpr
- Loading branch information
1 parent
379940b
commit 0d448ec
Showing
2 changed files
with
89 additions
and
14 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,65 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
publish: | ||
name: Release Spotify Confidence Provider | ||
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- | ||
# Fetch and publish the OpenFeature SDK locally, using remote "main" branch | ||
# This should be removed once the SDK artifacts are openly deployed | ||
- name: webfactory/ssh-agent | ||
uses: webfactory/ssh-agent@v0.7.0 | ||
with: | ||
ssh-private-key: ${{ secrets.SDK_REPO_PRIVATE_KEY }} | ||
- name: Clone OpenFeature SDK dependency | ||
run: git clone git@github.com:spotify/openfeature-kotlin-sdk.git | ||
- name: Publish OpenFeature SDK locally | ||
run: ./openfeature-kotlin-sdk/gradlew publishToMavenLocal -p openfeature-kotlin-sdk | ||
|
||
- 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 :provider:assemble | ||
|
||
- 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 Confidence Provider AAR 🗳 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_PUBLISH }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: Provider/build/outputs/aar/Provider-release.aar | ||
asset_name: provider-release.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