Skip to content

Commit

Permalink
Merge pull request #35 from zowe/feature/release_workflow_zen
Browse files Browse the repository at this point in the history
Release workflow zen
  • Loading branch information
1000TurquoisePogs authored Sep 18, 2023
2 parents 0318518 + 265ca3b commit 08d39d6
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release zen draft
on:
workflow_run:
workflows: ["Build zen"]
branches: [v2.x/main]
types:
- completed
workflow_dispatch:
inputs:
BUMP_TYPE:
description: 'When version bumping, set patch, minor, or major. Need this xor RELEASE_TAG.'
required: false
RELEASE_TAG:
description: 'Disable bumping by specifying a semver pattern (without v). Need this xor BUMP_TYPE'
required: false
RUN_ID:
description: 'Specify run id of asset to associate with release.'
required: true

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: '[Setup] default env'
if: ${{ inputs.BUMP_TYPE == '' && inputs.RELEASE_TAG == '' }}
run: |
echo "BUMP_TYPE=minor" >> $GITHUB_ENV
- name: '[Setup] input env'
if: ${{ inputs.BUMP_TYPE }}
run: |
echo "BUMP_TYPE=${{ inputs.BUMP_TYPE }}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
- name: '[Create tag]'
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ github.token }}
default_bump: ${{ env.BUMP_TYPE }}
custom_tag: ${{ inputs.RELEASE_NUMBER }}
- name: '[Create release]'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
draft: true
prerelease: false
token: ${{ github.token }}

0 comments on commit 08d39d6

Please sign in to comment.