Skip to content

Commit

Permalink
test semantic release integration
Browse files Browse the repository at this point in the history
  • Loading branch information
grablack committed Mar 6, 2024
1 parent 830f89d commit a39e201
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 40 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/release-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,24 @@ jobs:
signing_key_file: ${{ secrets.SIGNING_KEY_FILE }}
signing_file_path: ${{ env.SIGNING_KEY_FILE_PATH }}

# - name: Install Semantic Release Dependencies
# run: npm install
- name: Install Semantic Release Dependencies
run: npm install

# TODO: update .releaserc.json with appropriate prepareCmd, successCmd, and assets
# TODO: enable semantic-release once fixed
# - name: GitHub Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: npx semantic-release@21
- name: GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_KEY_FILE: ${{ env.SIGNING_KEY_FILE_PATH }}
run: npx semantic-release@21

- name: Set Snapshot variable
id: set_var
run: echo "UPDATE_VERSION_SNAPSHOT=true" >> $GITHUB_ENV

# - name: Publish to Maven
# uses: ./.github/actions/publish_all_modules
# with:
# sonatype_user: ${{ secrets.SONATYPE_SDKS_NEXUS_USERNAME }}
# sonatype_password: ${{ secrets.SONATYPE_SDKS_NEXUS_PASSWORD }}
# signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
# signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }}
# signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
- name: Publish to Maven
uses: ./.github/actions/publish_all_modules
with:
sonatype_user: ${{ secrets.SONATYPE_SDKS_NEXUS_USERNAME }}
sonatype_password: ${{ secrets.SONATYPE_SDKS_NEXUS_PASSWORD }}
signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }}
signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
29 changes: 10 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
signing_key_file: ${{ secrets.SIGNING_KEY_FILE }}
signing_file_path: ${{ env.SIGNING_KEY_FILE_PATH }}

# - name: Install Semantic Release Dependencies
# run: npm install
- name: Install Semantic Release Dependencies
run: npm install

- name: GitHub Release
env:
Expand All @@ -57,20 +57,11 @@ jobs:
SIGNING_KEY_FILE: ${{ env.SIGNING_KEY_FILE_PATH }}
run: npx semantic-release@21

- name: Get latest release
id: get_release
run: |
echo "::set-output name=release::${GITHUB_REF#refs/tags/}"
- name: Echo Semantic Release Version
run: |
echo "Semantic Release Version: ${{ steps.get_release.outputs.release }}"
# - name: Publish to Maven
# uses: ./.github/actions/publish_all_modules
# with:
# sonatype_user: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
# sonatype_password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
# signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
# signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }}
# signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
- name: Publish to Maven
uses: ./.github/actions/publish_all_modules
with:
sonatype_user: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatype_password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }}
signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jmailen.gradle.kotlinter.tasks.FormatTask

buildscript {
ext.modules = [
"sdkVersionName" : "1.0.0-alpha.00",
"sdkVersionName" : "1.0.0-alpha.01-SNAPSHOT",
"androidMinSdkVersion": 23,
"androidTargetVersion": 34
]
Expand Down

0 comments on commit a39e201

Please sign in to comment.