Skip to content

Commit 9d329e0

Browse files
committed
ci: Adjust and modernize workflow files to match other repos
1 parent e9fcb4a commit 9d329e0

File tree

7 files changed

+117
-103
lines changed

7 files changed

+117
-103
lines changed

.github/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
firstPRMergeComment: >
2-
❤️ Thank you for contributing to ReVanced Manager. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.
2+
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) to receive a role for your contribution.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build pull request
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- dev
8+
9+
jobs:
10+
release:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Cache Gradle
20+
uses: burrunan/gradle-cache-action@v1
21+
22+
- name: Build
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: ./gradlew build --no-daemon
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Open a PR to main
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
env:
10+
MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main`
11+
12+
jobs:
13+
pull-request:
14+
name: Open pull request
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Open pull request
21+
uses: repo-sync/pull-request@v2
22+
with:
23+
destination_branch: 'main'
24+
pr_title: 'chore: ${{ env.MESSAGE }}'
25+
pr_body: 'This pull request will ${{ env.MESSAGE }}.'
26+
pr_draft: true

.github/workflows/pr-build.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/release-build.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- dev
9+
10+
jobs:
11+
release:
12+
name: Release
13+
permissions:
14+
contents: write
15+
id-token: write
16+
attestations: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Java
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'temurin'
28+
java-version: '17'
29+
30+
- name: Cache Gradle
31+
uses: burrunan/gradle-cache-action@v1
32+
33+
- name: Build
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
run: ./gradlew assembleRelease
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: "lts/*"
42+
cache: 'npm'
43+
44+
- name: Install dependencies
45+
run: npm ci
46+
47+
- name: Setup keystore
48+
run: |
49+
echo "${{ secrets.KEYSTORE }}" | base64 --decode > "app/keystore.jks"
50+
51+
- name: Semantic Release
52+
uses: cycjimmy/semantic-release-action@v4
53+
id: semantic
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
57+
KEYSTORE_ENTRY_ALIAS: ${{ secrets.KEYSTORE_ENTRY_ALIAS }}
58+
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
59+
60+
- name: Attest
61+
if: steps.semantic.outputs.new_release_published == 'true'
62+
uses: actions/attest-build-provenance@v2
63+
with:
64+
subject-path: build/app/outputs/apk/release/revanced-manager-*.apk

.github/workflows/update-documentation.yml renamed to .github/workflows/update_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
1717
repository: revanced/revanced-documentation
1818
event-type: update-documentation
19-
client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'
19+
client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'

0 commit comments

Comments
 (0)