Skip to content

Commit fe864d8

Browse files
validcubeoSumAtrIX
andauthored
ci: Attest release artifacts (#4816)
Co-authored-by: oSumAtrIX <[email protected]>
1 parent 4f68693 commit fe864d8

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

.github/workflows/build_pull_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
- name: Setup Java
2020
uses: actions/setup-java@v4
2121
with:
22-
distribution: "temurin"
23-
java-version: "17"
22+
distribution: 'temurin'
23+
java-version: '17'
2424

2525
- name: Cache Gradle
26-
uses: burrunan/gradle-cache-action@v1
26+
uses: burrunan/gradle-cache-action@v3
2727

2828
- name: Build
2929
env:

.github/workflows/release.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,23 @@ jobs:
1313
permissions:
1414
contents: write
1515
packages: write
16+
id-token: write
17+
attestations: write
1618
runs-on: ubuntu-latest
1719
steps:
1820
- name: Checkout
1921
uses: actions/checkout@v4
2022
with:
21-
# Make sure the release step uses its own credentials:
22-
# https://github.com/cycjimmy/semantic-release-action#private-packages
23-
persist-credentials: false
2423
fetch-depth: 0
2524

2625
- name: Setup Java
2726
uses: actions/setup-java@v4
2827
with:
29-
distribution: "temurin"
30-
java-version: "17"
28+
distribution: 'temurin'
29+
java-version: '17'
3130

3231
- name: Cache Gradle
33-
uses: burrunan/gradle-cache-action@v1
32+
uses: burrunan/gradle-cache-action@v3
3433

3534
- name: Build
3635
env:
@@ -40,7 +39,7 @@ jobs:
4039
- name: Setup Node.js
4140
uses: actions/setup-node@v4
4241
with:
43-
node-version: "lts/*"
42+
node-version: 'lts/*'
4443
cache: 'npm'
4544

4645
- name: Install dependencies
@@ -54,6 +53,14 @@ jobs:
5453
fingerprint: ${{ vars.GPG_FINGERPRINT }}
5554

5655
- name: Release
56+
uses: cycjimmy/semantic-release-action@v4
57+
id: release
5758
env:
5859
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
run: npm exec semantic-release
60+
61+
- name: Attest
62+
if: steps.release.outputs.new_release_published == 'true'
63+
uses: actions/attest-build-provenance@v2
64+
with:
65+
subject-name: 'ReVanced Patches ${{ steps.release.outputs.new_release_git_tag }}'
66+
subject-path: patches/build/libs/patches-*.rvp

.releaserc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{
2323
"assets": [
2424
"CHANGELOG.md",
25-
"gradle.properties",
25+
"gradle.properties"
2626
],
2727
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
2828
}
@@ -33,16 +33,16 @@
3333
"assets": [
3434
{
3535
"path": "patches/build/libs/patches-!(*sources*|*javadoc*).rvp?(.asc)"
36-
},
36+
}
3737
],
38-
successComment: false
38+
"successComment": false
3939
}
4040
],
4141
[
4242
"@saithodev/semantic-release-backmerge",
4343
{
44-
backmergeBranches: [{"from": "main", "to": "dev"}],
45-
clearWorkspace: true
44+
"backmergeBranches": [{"from": "main", "to": "dev"}],
45+
"clearWorkspace": true
4646
}
4747
]
4848
]

0 commit comments

Comments
 (0)