Skip to content

Commit

Permalink
ci: add release-please workflow (#37)
Browse files Browse the repository at this point in the history
* ci: add release-please workflow

* Upload zip to release

* Add last-release-sha
  • Loading branch information
davfsa committed Aug 11, 2024
1 parent bd20d2f commit 79e71fd
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 6 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
name: Publish
name: release-please

on:
workflow_dispatch:
push:
tags:
- "v*"
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
build:
name: Publish Plugin
release-please:
runs-on: ubuntu-latest

outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}

steps:
- uses: googleapis/release-please-action@v4
id: release

publish:
needs: [ "release-please" ]
if: needs.release-please.outputs.release_created

runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -28,3 +47,8 @@ jobs:
run: "./gradlew clean uploadPlugin -Porg.jetbrains.fleet-plugin.marketplaceUploadToken=${{ env.MARKETPLACE_TOKEN }}"
env:
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }}

- name: Upload Zip
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} catppuccin-theme/build/pluginDistribution/*.zip --clobber
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.0"
}
2 changes: 1 addition & 1 deletion catppuccin-theme/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
alias(libs.plugins.fleet.plugin)
}

version = "1.0.0"
version = "1.0.0" // x-release-please-version

fleetPlugin {
id = "com.github.catppuccin.fleet"
Expand Down
16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"last-release-sha": "a9673b64c43705498ad22a179541b401389eeb7d",
"packages": {
".": {
"package-name": "",
"release-type": "simple",
"extra-files": [
{
"type": "generic",
"path": "catppuccin-theme/build.gradle.kts"
}
]
}
}
}

0 comments on commit 79e71fd

Please sign in to comment.