From d156f890257d2135ef7f3ca9ffcb381961197b8f Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Sun, 5 May 2024 10:00:46 -0400 Subject: [PATCH] add edit hatch version action --- hatch/version/edit/action.yaml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 hatch/version/edit/action.yaml diff --git a/hatch/version/edit/action.yaml b/hatch/version/edit/action.yaml new file mode 100644 index 00000000..7cae14d1 --- /dev/null +++ b/hatch/version/edit/action.yaml @@ -0,0 +1,44 @@ +name: "Edit hatch version" +description: "Edit version in a hatch based package" + +inputs: + version: + description: "The version to bump to" + required: true + working-directory: + description: "Where to run commands from, primarily supports monorepo setups (e.g. /" + default: "./" + +runs: + using: composite + steps: + - name: "[DEBUG] Inputs" + shell: bash + run: | + echo "==========INPUTS==========" + echo version : ${{ inputs.version }} + echo working-directory : ${{ inputs.working-directory }} + + - name: "Bump version to `${{ inputs.version }}`" + shell: bash + run: hatch version ${{ inputs.version }} + working-directory: ${{ inputs.working-directory }} + + - name: "Commit and push changes" + id: commit + uses: ./github/commit/create + with: + message: "bump version to ${{ inputs.version }}" + + - name: "[INFO] Bump hatch version" + shell: bash + run: echo "::notice title=$TITLE::$MESSAGE" + env: + TITLE: "[${{ env.NOTIFICATION_PREFIX }}]: Bump hatch version" + MESSAGE: "Bumped from `${{ needs.current-version.outputs.version }}` to `${{ inputs.version }}`" + + - name: "[DEBUG] Outputs" + shell: bash + run: | + echo "==========OUTPUTS==========" + echo N/A