diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72e4b72..0066390 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,12 +8,29 @@ on: # Allow manual trigger workflow_dispatch: +permissions: + contents: write + pull-requests: write + env: # Necessary for most environments CGO_ENABLED: 1 jobs: + 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 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-build: + needs: release-please + if: ${{ needs.release-please.outputs.release_created || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') }} name: Release Build strategy: fail-fast: false @@ -38,6 +55,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ needs.release-please.outputs.tag_name || github.ref }} - name: Setup Go uses: actions/setup-go@v5 diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..1b1f6a8 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.9.4" +} diff --git a/build/config.yml b/build/config.yml index a4d4f52..8f2a7f0 100644 --- a/build/config.yml +++ b/build/config.yml @@ -11,7 +11,7 @@ info: description: "DevToolbox" # The application description copyright: "(c) 2026, Vuong" # Copyright text comments: "DevToolbox is a set of useful tools for daily development." # Comments - version: "0.0.1" # The application version + version: "0.9.4" # The application version # cfBundleIconName: "appicon" # The macOS icon name in Assets.car icon bundles (optional) # # Should match the name of your .icon file without the extension # # If not set and Assets.car exists, defaults to "appicon" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..feb56b4 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,12 @@ +{ + "packages": { + ".": { + "package-name": "devtoolbox", + "release-type": "go", + "include-component-in-tag": false, + "extra-files": [ + "build/config.yml" + ] + } + } +}