From 13c60ff69f0819a08d3271d0068904b26f2ebf0f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 26 Jan 2024 01:15:41 +0000 Subject: [PATCH 1/4] chore(release): 1.0.0-dev.1 [skip ci] # 1.0.0-dev.1 (2024-01-26) ### Features * Init ([66be625](https://github.com/ReVanced/revanced-patches-template/commit/66be625f25ee2d678dac62a5bf4daa631284f8f6)) --- CHANGELOG.md | 6 ++++++ gradle.properties | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..542b46638 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# 1.0.0-dev.1 (2024-01-26) + + +### Features + +* Init ([66be625](https://github.com/ReVanced/revanced-patches-template/commit/66be625f25ee2d678dac62a5bf4daa631284f8f6)) diff --git a/gradle.properties b/gradle.properties index ee4fdea2a..aa531a541 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true kotlin.code.style = official - +version = 1.0.0-dev.1 From daca3478621c53c3780db1844d6a123d70a727f4 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 26 Jan 2024 02:28:20 +0100 Subject: [PATCH 2/4] docs: Add template usage steps --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 108739a69..74a6bb92e 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,15 @@ The repository can have multiple patches, and patches from other repositories ca For an example repository, see [ReVanced Patches](https://github.com/revanced/revanced-patches). -## 🚀 Get started +## 🚀 Get started To start using this template, follow these steps: 1. [Create a new repository using this template](https://github.com/new?template_name=revanced-patches-template&template_owner=ReVanced) 2. Set up the [build.gradle.kts](build.gradle.kts) file (Match the [group of the project](build.gradle.kts#L8), [manifest attributes](build.gradle.kts#L35-L43), and the [POM](build.gradle.kts#L84-L106) that will be published to yours) 3. Update the dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file -4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to your repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication) -5. Set up the [README.md](README.md) file[^1] (e.g title, description, license, short summary of the patches that are included in the repository) +4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to your repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication) +5. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches that are included in the repository) 🎉 You are now ready to start creating patches! @@ -29,3 +29,14 @@ You can also add the following things to the repository: [^2]: [Example issue templates](https://github.com/ReVanced/revanced-patches/tree/main/.github/ISSUE_TEMPLATE) [^3]: [Example contribution guidelines](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md) [^4]: [Example documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs) + +## 🧑‍💻 Usage + +In order to develop and release ReVanced Patches using this template, some things need to be considered: + +- Development originates in feature branches. Once a feature branch is ready, it is squshed and merged into the `dev` branch +- The `dev` branch is merged into the `main` branch once it is ready for release +- Semantic versioning is used for versioning ReVanced Patches. ReVanced Patches have a public API for other patches to use +- Semantic commit messages are used for commits +- Commits on the `dev` branch and `main` branch are automatically released via the [release.yml](.github/workflows/release.yml) workflow, which is also responsible for generating the changelog and updating the version of ReVanced Patches. It is triggered by pushing to the `dev` or `main` branch. The workflow uses the `publish` task to publish the release of ReVanced Patches +- In order to build ReVanced Patches, that can be used on Android, the [`generateBundle`](build.gradle.kts#L48-L70) task needs to be run. The [`publish` task depends on the `generateBundle`](build.gradle.kts#L74-L76) task, so it will be run automatically when publishing a release. From 4da5ed53d650bdec585a275d589e44968c5e2ed6 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 26 Jan 2024 02:33:23 +0100 Subject: [PATCH 3/4] ci: Add workflow to open a PR automatically --- .github/workflows/pull_request.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 000000000..75b8e67fa --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,26 @@ +name: Open a PR to main + +on: + push: + branches: + - dev + workflow_dispatch: + +env: + MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main` + +jobs: + pull-request: + name: Open pull request + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Open pull request + uses: repo-sync/pull-request@v2 + with: + destination_branch: 'main' + pr_title: 'chore: ${{ env.MESSAGE }}' + pr_body: 'This pull request will ${{ env.MESSAGE }}.' + pr_draft: true From a0971b67c1b17891a78c2661555afea4b5ed07ef Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 26 Jan 2024 02:37:04 +0100 Subject: [PATCH 4/4] ci: Fix caching using Node.js action --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c37e2089a..2c6a93120 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: "lts/*" + cache: 'npm' - name: Install dependencies run: npm install