diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cd85dcf..96cf7ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,12 @@ jobs: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} # Branch to merge into main steps: + - name: Fail if branch is not main + if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' + run: | + echo "This workflow should not be triggered manually on a branch other than main" + exit 1 + - uses: actions/checkout@v4 - name: Bump version and push tag @@ -38,7 +44,7 @@ jobs: - name: Setup release files run: | unzip 3d.step.zip - mv 3d.step 3d-${{ steps.tag.outputs.new_tag }}.zip + mv 3d.step 3d-${{ steps.tag.outputs.new_tag }} mv manufacturing.zip manufacturing-${{ steps.tag.outputs.new_tag }}.zip mv release.zip release-${{ steps.tag.outputs.new_tag }}.zip @@ -48,4 +54,4 @@ jobs: tag: ${{ steps.tag.outputs.new_tag }} name: Release ${{ steps.tag.outputs.new_tag }} body: ${{ steps.tag.outputs.changelog }} - artifacts: "3d-${{ steps.tag.outputs.new_tag }}.zip,manufacturing-${{ steps.tag.outputs.new_tag }}.zip,release-${{ steps.tag.outputs.new_tag }}.zip" + artifacts: "3d-${{ steps.tag.outputs.new_tag }},manufacturing-${{ steps.tag.outputs.new_tag }}.zip,release-${{ steps.tag.outputs.new_tag }}.zip"