This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
forked from Adyen/adyen-android
-
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.
update version number and fix release workflow
- Loading branch information
Showing
5 changed files
with
12 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,75 +1,25 @@ | ||
name: Publish Release v4 | ||
|
||
# Only triggered manually | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
env: | ||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | ||
CODEARTIFACT_AUTH_TOKEN: ${{ secrets.CODEARTIFACT_AUTH_TOKEN }} | ||
|
||
publish-release-v4: | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
- name: Configure JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
cache: 'gradle' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Gradle check | ||
run: ./gradlew check --no-daemon | ||
|
||
# TODO: add more tests or rely on check_release workflow? | ||
|
||
# Base64 decodes and pipes the GPG key content into the secret file | ||
- name: Prepare environment | ||
env: | ||
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} | ||
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | ||
run: | | ||
git fetch --unshallow | ||
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'" | ||
# Packages and publishes to Maven Central | ||
- name: Publish to Maven Central | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 --stacktrace --no-daemon | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
|
||
# Get the version name from a script and save to environment variable. | ||
- name: Set PROJECT_VERSION | ||
run: | | ||
echo "▸ Set run permission." | ||
chmod +x scripts/version_name.sh | ||
echo "▸ Getting version name" | ||
PROJECT_VERSION=$(./scripts/version_name.sh) | ||
echo "▸ Variable PROJECT_VERSION set to: ${PROJECT_VERSION}" | ||
echo "▸ Adding PROJECT_VERSION variable with: $PROJECT_VERSION" | ||
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV | ||
echo "▸ DONE" | ||
# Create the Release TAG and notes. | ||
- name: Create GitHub Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
commitish: v4 | ||
tag_name: ${{ env.PROJECT_VERSION }} | ||
release_name: ${{ env.PROJECT_VERSION }} | ||
body_path: ${{ github.workspace }}/RELEASE_NOTES.md | ||
draft: false | ||
prerelease: false | ||
- name: Publish Artifacts | ||
run: ./gradlew publishReleasePublicationToGygcodeartifactRepository |
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