Skip to content

Commit

Permalink
fix(publish release): fized 3d-vX.X.X.zip upload
Browse files Browse the repository at this point in the history
fix(publish release): added main branch check before executing pipeline. This pipeline has to be executed only from main branch.
  • Loading branch information
Supermanuu committed Aug 9, 2024
1 parent d07b750 commit ef3f8d7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"

0 comments on commit ef3f8d7

Please sign in to comment.