Skip to content

Commit

Permalink
Attempt to prepare the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
alorma committed Feb 28, 2024
1 parent 5c10334 commit be2b617
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

# Builds the release artifacts of the library
- name: Build
run: ./gradlew build
#- name: Build
# run: ./gradlew build

fake-publish:
name: Fake publish - Main
Expand All @@ -36,11 +36,13 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v4
with:
Expand All @@ -49,6 +51,14 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- name: Prepare environment
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ vars.SIGNING_SECRET_KEY_RING_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
# Runs upload, and then closes & releases the repository
- name: Publish to MavenLocal
run: ./gradlew publishReleasePublicationToMavenLocal --max-workers 1
Expand All @@ -67,11 +77,13 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v4
with:
Expand All @@ -80,6 +92,14 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- name: Prepare environment
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ vars.SIGNING_SECRET_KEY_RING_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
# Runs upload, and then closes & releases the repository
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository --dry-run
Expand Down

0 comments on commit be2b617

Please sign in to comment.