feat: add Huawei and email_reply_to_address parameters to Notification#73
feat: add Huawei and email_reply_to_address parameters to Notification#73sherwinski merged 1 commit intomainfrom
Conversation
4019c00 to
d27eb61
Compare
d27eb61 to
8a5dfca
Compare
8a5dfca to
d9d4ca8
Compare
d9d4ca8 to
d122df9
Compare
| name: Publish to Maven Central | ||
| needs: release | ||
| if: needs.release.outputs.new_release_published == 'true' | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | ||
| MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | ||
| SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
| SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
| GPG_FILE_NAME: onesignal_sdk_gpg_subkeys.gpg | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '11' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Cache Gradle packages | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle- | ||
|
|
||
| - name: Grant execute permission for gradlew | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: Set version from input | ||
| if: github.event.inputs.version != '' | ||
| run: | | ||
| echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV | ||
| sed -i "s/version = '[^']*'/version = '${{ github.event.inputs.version }}'/" build.gradle | ||
|
|
||
| - name: Build project | ||
| run: ./gradlew build | ||
|
|
||
| - name: Run tests | ||
| run: ./gradlew test | ||
|
|
||
| - name: Decode GPG file from secret | ||
| run: | | ||
| echo "${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}" | base64 -d > "$GPG_FILE_NAME" | ||
| echo "GPG_FILE_PATH=$(pwd)/$GPG_FILE_NAME" >> $GITHUB_ENV | ||
|
|
||
| - name: Verify GPG file | ||
| run: | | ||
| ls -lh "$GPG_FILE_PATH" | ||
| gpg --list-packets "$GPG_FILE_PATH" || echo "Invalid key file!" | ||
|
|
||
| - name: Publish to Maven Central | ||
| run: | | ||
| ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache \ | ||
| -PmavenCentralUsername="$MAVEN_CENTRAL_USERNAME" \ | ||
| -PmavenCentralPassword="$MAVEN_CENTRAL_PASSWORD" \ | ||
| -Psigning.keyId="$SIGNING_KEY_ID" \ | ||
| -Psigning.password="$SIGNING_PASSWORD" \ | ||
| -Psigning.secretKeyRingFile="$GPG_FILE_PATH" | ||
|
|
||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: build-artifacts | ||
| path: build/libs/ |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 days ago
In general, fix this by explicitly setting minimal permissions for jobs that use the default GITHUB_TOKEN, instead of relying on repo defaults. For jobs that only need to read the repository (or not use the token at all), set contents: read at the job or workflow level; only grant write scopes where strictly required.
For this workflow, the release job already has a permissions block. The publish job (lines 49–120) does not, so we should add an explicit permissions block under publish:. The steps in publish only require cloning the code and uploading artifacts; both can work with a read‑only contents permission. Therefore, the best fix is to add:
permissions:
contents: readright below the existing runs-on: ubuntu-latest line in the publish job. This preserves all existing behavior while ensuring the GITHUB_TOKEN used in this job is limited to read‑only access to repository contents. No additional imports, methods, or definitions are needed, since this is purely a YAML configuration change.
| @@ -51,6 +51,8 @@ | ||
| needs: release | ||
| if: needs.release.outputs.new_release_published == 'true' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | ||
| MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} |
email_reply_to_address parameters to Notification
7bb3637 to
e01cee1
Compare
email_reply_to_address parameters to Notification## [5.3.0](v5.2.0...v5.3.0) (2026-03-24) ### Features * add Huawei and email_reply_to_address parameters to Notification ([#73](#73)) ([62dc9fc](62dc9fc)) [skip ci]
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Features
Adds the following
Notificationparameters:huawei_badge_classhuawei_badge_add_numhuawei_badge_set_numhuawei_categoryhuawei_bi_tagemail_reply_to_address