Skip to content

Commit

Permalink
Do not automatically create release for push
Browse files Browse the repository at this point in the history
  • Loading branch information
shining-man committed Feb 9, 2024
1 parent adb3a42 commit 4e37df5
Showing 1 changed file with 1 addition and 44 deletions.
45 changes: 1 addition & 44 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,47 +81,4 @@ jobs:
name: bsc_firmware
#path: .pio/build/*/firmware.bin
path: ./output_fw
if-no-files-found: error

- name: Read file changes
id: read_file_changes
uses: andstor/file-reader-action@v1
with:
path: "changes.txt"

- name: Create Release Files (only on MAIN branch)
id: create_release
uses: actions/create-release@v1
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.BSC_SW_VERSION }}_${{ env.dt }}
release_name: ${{ env.BSC_SW_VERSION }}_${{ env.dt }}
body: ${{ steps.read_file_changes.outputs.contents }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./output_fw/bsc_release_${{ env.BSC_SW_VERSION }}_${{ env.dt }}.zip
asset_name: bsc_firmware_${{ env.BSC_SW_VERSION }}_${{ env.dt }}.zip
asset_content_type: application/zip

- name: upload artifact
id: upload-release-bin-file
uses: actions/upload-release-asset@v1
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./output_fw/bsc/firmware.bin
asset_name: fw_bsc_ota.bin
asset_content_type: application/octet-stream
if-no-files-found: error

0 comments on commit 4e37df5

Please sign in to comment.