Skip to content

Commit

Permalink
update deployment workflow to match scout helper deploy style
Browse files Browse the repository at this point in the history
  • Loading branch information
dit-zy committed Aug 12, 2024
1 parent b53dca2 commit 5c48ae7
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ name: deploy plugin
on:
workflow_dispatch:
inputs:
deployment_type:
description: 'stable or testing'
release_type:
description: 'what kind of release is this?'
type: choice
required: true
default: 'testing'
default: 'PATCH'
options:
- stable
- testing
version:
description: 'version (e.g. 1.0.0.0)'
type: string
required: true
- MAJOR
- MINOR
- PATCH
- promote to stable
open_pr:
description: 'should a pr be opened for the deployment?'
type: boolean
Expand All @@ -25,31 +23,36 @@ jobs:
prepare-deploy:
runs-on: ubuntu-latest
steps:
- name: configure inputs
id: configure-inputs
env:
DEPLOYMENT_TYPE: ${{ inputs.deployment_type }}
run: |
if [[ $DEPLOYMENT_TYPE == 'testing' ]]; then
echo "deployment_type=testing/live" >> $GITHUB_OUTPUT
else
echo "deployment_type=$DEPLOYMENT_TYPE" >> $GITHUB_OUTPUT
fi
- name: configure inputs
id: configure-inputs
env:
RELEASE_TYPE: ${{ inputs.release_type }}
run: |
if [[ $RELEASE_TYPE == promote* ]]; then
echo "version_change=NONE" >> $GITHUB_OUTPUT
echo "deployment_type=stable" >> $GITHUB_OUTPUT
else
echo "version_change=$RELEASE_TYPE" >> $GITHUB_OUTPUT
echo "deployment_type=testing" >> $GITHUB_OUTPUT
fi
outputs:
version_change: ${{ steps.configure-inputs.outputs.version_change }}
deployment_type: ${{ steps.configure-inputs.outputs.deployment_type }}

deploy-plugin:
uses: kalilistic/DalamudPluginDeploy/.github/workflows/deploy_plugin.yml@7dd6a4952a96ad4b3b5b0c61ab90e64fd09f1c4e
uses: dit-zy/DalamudPluginDeploy/.github/workflows/deploy_plugin.yml@v1
needs: prepare-deploy
with:
public_name: 'ScoutHelper'
internal_name: 'ScoutHelper'
project_dir: 'ScoutHelper'
project_name: 'ScoutHelper'
owners: 'dit-zy,zw3lf'
version_change: ${{ needs.prepare-deploy.outputs.version_change }}
deployment_type: ${{ needs.prepare-deploy.outputs.deployment_type }}
github_username: 'dit-zy'
github_email: '[email protected]'
open_pr: ${{ inputs.open_pr }}
deployment_type: ${{ needs.prepare-deploy.outputs.deployment_type }}
version: ${{ inputs.version }}
force_push: true
secrets:
DEPLOY_TOKEN: ${{ secrets.PAT }}

0 comments on commit 5c48ae7

Please sign in to comment.