diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ff6704..41859cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,14 @@ name: Release Workflow on: - release: - types: [published] + # release: + # types: [published] + + push: + branches: + - main + + workflow_dispatch: jobs: zip-files: @@ -17,20 +23,24 @@ jobs: with: cmd: yq '.homeassistant.customize."package.cn".version' packages/centro_notifiche/hub_main.yaml + # - name: 📦 Create zip file for the packages blueprints lovelace folder + # uses: vimtor/action-zip@v1.1 + # with: + # files: packages/ blueprints/ lovelace/ + # dest: centro_notifiche.zip + # recursive: false + - name: 📦 Create zip file for the packages blueprints lovelace folder - uses: vimtor/action-zip@v1.1 - with: - files: packages/ blueprints/ lovelace/ - dest: centro_notifiche.zip - recursive: false - + run: | + cd "${{ github.workspace }}" + zip -r centro_notifiche.zip packages blueprints lovelace + - name: 📤 Upload the zip file as a release asset and 🖊️ Set version number uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: "${{ github.workspace }}/centro_notifiche.zip" asset_name: centro_notifiche.zip - # default # tag: ${{ github.ref }} tag: ${{ steps.get_version.outputs.result }} overwrite: true prerelease: true