diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87265f73..d1ab1bec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,15 @@ name: Release on: workflow_dispatch: + inputs: + release_type: + description: 'Release Options' + required: true + default: 'Initial Release' + type: choice + options: + - Initial Release + - Redeploy jobs: setup: @@ -22,7 +31,7 @@ jobs: fi - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Get Package Version id: retrieve-version @@ -39,7 +48,8 @@ jobs: echo "Latest version: $latest_ver" ver=${{ steps.retrieve-version.outputs.package_version }} echo "Version: $ver" - if [ "$latest_ver" = "$ver" ]; then + if [ "$latest_ver" = "$ver" ] && \ + [ "${{ github.event.inputs.release_type }}" == "Initial Release" ]; then echo "Version has not been bumped!" exit 1 fi @@ -58,7 +68,7 @@ jobs: branch: ${{ steps.branch.outputs.branch-name }} - name: Create release - uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5 + uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5 env: PKG_VERSION: ${{ steps.retrieve-version.outputs.package_version }} with: @@ -101,10 +111,10 @@ jobs: _PKG_VERSION: ${{ needs.setup.outputs.package_version }} steps: - name: Checkout Repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Install Snap - uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0 + uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0 with: snapcraft_token: ${{ secrets.SNAP_TOKEN }} @@ -136,7 +146,7 @@ jobs: _PKG_VERSION: ${{ needs.setup.outputs.package_version }} steps: - name: Checkout Repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Setup Chocolatey run: choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/