24.14.1 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
release_zip_file: | |
name: Prepare release asset | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout the repository | |
uses: actions/checkout@v2 | |
- name: 🔢 Get version | |
id: version | |
uses: home-assistant/actions/helpers/version@master | |
- name: 🔢 Set version number | |
run: | | |
sed -i '/INTEGRATION_VERSION = /c\INTEGRATION_VERSION = "${{ steps.version.outputs.version }}"' "${{ github.workspace }}/custom_components/netdaemon/const.py" | |
jq '.version = "${{ steps.version.outputs.version }}"' "${{ github.workspace }}/custom_components/netdaemon/manifest.json" > tmp && mv -f tmp "${{ github.workspace }}/custom_components/netdaemon/manifest.json" | |
- name: 📦 ZIP netdaemon directory | |
run: | | |
cd "${{ github.workspace }}/custom_components/netdaemon" | |
zip netdaemon.zip -r ./ | |
- name: 📤 Upload release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: "${{ github.workspace }}/custom_components/netdaemon/netdaemon.zip" | |
asset_name: netdaemon.zip | |
asset_content_type: application/zip |