Skip to content

Commit

Permalink
ci(update-release-script): fix failing delete intermediate branch step (
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzamahmood committed May 11, 2023
1 parent 0beb0ec commit e84f4ae
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
@@ -1,5 +1,5 @@
name: Release To Maven Central

run-name: Release ${{ github.event.inputs.Version }}
# Run workflow on commits to the `main` branch
on:
workflow_dispatch:
Expand All @@ -8,10 +8,6 @@ on:
description: "Version to be released in format: x.y.z, where x => major version, y => minor version and z => patch version"
required: true
default: "0.1.0"
Title:
description: "Title of the release"
required: true
default: "Improving API developer experience"

jobs:
publish:
Expand Down Expand Up @@ -42,7 +38,7 @@ jobs:
uses: devops-infra/action-commit-push@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
commit_message: "ci(release-version): update pom.xml [ci skip]"
commit_message: "ci(release-version) update pom.xml [ci skip]"
force: false
target_branch: project-version-update
- name: Push the version change
Expand All @@ -53,10 +49,9 @@ jobs:
branch: main
- name: Delete the intermediate branch
if: steps.release.outputs.exit_code == 0
uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{github.token}}
branches: project-version-update
run: |
git branch -D project-version-update &>/dev/null || true
git push origin :project-version-update &>/dev/null || true
- name: Create tag
if: steps.release.outputs.exit_code == 0
id: tag_version
Expand All @@ -71,5 +66,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ github.event.inputs.Title }}
name: Version ${{ github.event.inputs.Version }}
body: ${{ steps.tag_version.outputs.changelog }}

0 comments on commit e84f4ae

Please sign in to comment.