diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 642e1ee8..25da70f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,28 @@ name: "Mainline release" on: + workflow_dispatch: push: - tags: - - "v*" + branches: [main] + +permissions: + contents: write + pull-requests: write + jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + id: release + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + release: runs-on: ubuntu-latest + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} steps: - name: Checkout uses: actions/checkout@v4 @@ -27,7 +43,6 @@ jobs: python ./build.py frappe --all-accents --zip -d $PWD/releases && python ./build.py latte --all-accents --zip -d $PWD/releases - name: Add zips to release - uses: softprops/action-gh-release@v2 - with: - draft: true - files: ./releases/*.zip + run: gh release upload ${{ needs.release-please.outputs.tag_name }} releases/*.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..37fcefaa --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.0.0" +} diff --git a/README.md b/README.md index 68c666c5..cc8420ad 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ This GTK theme requires: We provide a Python script to automate the process of installing the theme: + + ```bash curl -LsS "https://raw.githubusercontent.com/catppuccin/gtk/main/install.py" -o install.py python3 install.py @@ -130,6 +132,8 @@ ln -sf "${THEME_DIR}/gtk-4.0/gtk.css" "${HOME}/.config/gtk-4.0/gtk.css" && ln -sf "${THEME_DIR}/gtk-4.0/gtk-dark.css" "${HOME}/.config/gtk-4.0/gtk-dark.css" ``` + + ## Building If our prebuilt offerings do not match your requirements, you will have to build the theme from source. diff --git a/install.py b/install.py index 26547c74..ba10a7f0 100644 --- a/install.py +++ b/install.py @@ -94,7 +94,7 @@ def parse_args(): def build_release_url(ctx: InstallContext) -> str: repo_root = "https://github.com/catppuccin/gtk/releases/download" - release = "v1.0.0" + release = "v1.0.0" # x-release-please-version zip_name = f"catppuccin-{ctx.flavor}-{ctx.accent}-standard+default.zip" return f"{repo_root}/{release}/{zip_name}" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..ad8e1b88 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,15 @@ +{ + "last-release-sha": "8b54c05ff5de6c7fabc68fab410cfd093a91193c", + "draft": true, + "packages": { + ".": { + "package-name": "", + "release-type": "simple", + "extra-files": [ + { "type": "generic", "path": "README.md" }, + { "type": "generic", "path": "install.py" } + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}