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