Skip to content

Commit

Permalink
Cleanup commit history & signoff
Browse files Browse the repository at this point in the history
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
  • Loading branch information
katelynienaber committed Aug 26, 2021
1 parent 18b48f2 commit 62d81c6
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
steps:
- name: Checkout the Source Code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup NodeJS
uses: actions/setup-node@v1
Expand Down Expand Up @@ -147,39 +149,35 @@ jobs:
run: "echo ::set-output name=top_package::$(cat package.json)"
id: get_version
- name: Get most recent GitHub release version
run: "echo ::set-output name=gh_version::$(git describe --tags $(git rev-list --tags --max-count=1))"
id: get_gh_version
uses: "WyriHaximus/github-action-get-previous-tag@v1"

# Removed step because of issues with publishing
# - name: Check if files were staged
# run: "echo ::set-output name=files_staged::$(git diff --cached --quiet || echo $?)"
# id: check_project

- name: Check version is bumped
run: |
if [[ fromJson(steps.get_version.outputs.top_package).version !== v + steps.get_gh_version.outputs.gh_version ]]; then
echo "::set-output name=version_bumped::true"
else
echo "::set-output name=version_bumped::false"
fi
if: ${{ !contains(steps.get_gh_version.outputs.tag, fromJson(steps.get_version.outputs.top_package).version) }}
run: echo "::set-output name=version_bumped::true"
id: check_project

# Each individual action should git-add the desired files
- name: Update Project Files with new Version
if: steps.check_project.outputs.version_bumped == true
if: steps.check_project.outputs.version_bumped
run: |
git status
git commit -m "Version Bumped to ${{ fromJson(steps.get_version.outputs.top_package).version }}" --signoff
- name: Push changes
if: steps.check_project.outputs.version_bumped == true
if: steps.check_project.outputs.version_bumped
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
branch: ${{ github.ref }}

- name: Create the Release
if: steps.check_project.outputs.version_bumped == true
if: steps.check_project.outputs.version_bumped
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -197,9 +195,8 @@ jobs:

- name: Upload the Zowe Explorer Assets
if: |
steps.check_project.outputs.version_bumped == true &&
steps.check_project.outputs.version_bumped &&
steps.deploy_zowe_explorer.outputs.archive != null
# steps.check_project.outputs.version_bumped == true || github.event.input.create_release == 'true') &&
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -211,9 +208,8 @@ jobs:

- name: Upload the FTP Extension for Zowe Explorer Assets
if: |
steps.check_project.outputs.version_bumped == true &&
steps.check_project.outputs.version_bumped &&
steps.deploy_zowe_explorer_ftp_extension.outputs.archive != null
# steps.check_project.outputs.version_bumped == true || github.event.input.create_release == 'true') &&
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -225,9 +221,8 @@ jobs:

- name: Upload the Zowe Explorer APIs Assets
if: |
steps.check_project.outputs.version_bumped == true &&
steps.check_project.outputs.version_bumped &&
steps.deploy_zowe_explorer_api.outputs.archive != null
# steps.check_project.outputs.version_bumped == true || github.event.input.create_release == 'true') &&
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -239,9 +234,8 @@ jobs:

- name: Upload the ESLint plugin for Zowe Explorer Assets
if: |
steps.check_project.outputs.version_bumped == true &&
steps.check_project.outputs.version_bumped &&
steps.deploy_eslint_plugin_zowe_explorer.outputs.archive != null
# steps.check_project.outputs.version_bumped == true || github.event.input.create_release == 'true') &&
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 62d81c6

Please sign in to comment.