ci: Attest release artifacts (#4816)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
Pun Butrach 2025-05-22 19:56:33 +07:00 committed by GitHub
parent 6ce739b0d0
commit 48b2e081ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 16 deletions

View File

@ -19,11 +19,11 @@ jobs:
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: "temurin" distribution: 'temurin'
java-version: "17" java-version: '17'
- name: Cache Gradle - name: Cache Gradle
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v3
- name: Build - name: Build
env: env:

View File

@ -13,24 +13,23 @@ jobs:
permissions: permissions:
contents: write contents: write
packages: write packages: write
id-token: write
attestations: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false
fetch-depth: 0 fetch-depth: 0
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: "temurin" distribution: 'temurin'
java-version: "17" java-version: '17'
- name: Cache Gradle - name: Cache Gradle
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v3
- name: Build - name: Build
env: env:
@ -40,7 +39,7 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: 'lts/*'
cache: 'npm' cache: 'npm'
- name: Install dependencies - name: Install dependencies
@ -54,6 +53,14 @@ jobs:
fingerprint: ${{ vars.GPG_FINGERPRINT }} fingerprint: ${{ vars.GPG_FINGERPRINT }}
- name: Release - name: Release
uses: cycjimmy/semantic-release-action@v4
id: release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm exec semantic-release
- name: Attest
if: steps.release.outputs.new_release_published == 'true'
uses: actions/attest-build-provenance@v2
with:
subject-name: 'ReVanced Patches ${{ steps.release.outputs.new_release_git_tag }}'
subject-path: patches/build/libs/patches-*.rvp

View File

@ -22,7 +22,7 @@
{ {
"assets": [ "assets": [
"CHANGELOG.md", "CHANGELOG.md",
"gradle.properties", "gradle.properties"
], ],
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" "message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
} }
@ -33,16 +33,16 @@
"assets": [ "assets": [
{ {
"path": "patches/build/libs/patches-!(*sources*|*javadoc*).rvp?(.asc)" "path": "patches/build/libs/patches-!(*sources*|*javadoc*).rvp?(.asc)"
}, }
], ],
successComment: false "successComment": false
} }
], ],
[ [
"@saithodev/semantic-release-backmerge", "@saithodev/semantic-release-backmerge",
{ {
backmergeBranches: [{"from": "main", "to": "dev"}], "backmergeBranches": [{"from": "main", "to": "dev"}],
clearWorkspace: true "clearWorkspace": true
} }
] ]
] ]