Skip to content

🔨 Dev Tool #149

🔨 Dev Tool

🔨 Dev Tool #149

Workflow file for this run

name: Release Version
on:
push:
branches: [ main ]
paths-ignore:
- '.github/**'
# pull_request:
# branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.0.0
with:
ref: main
- name: Set up Python 3
uses: actions/setup-python@v4.7.0
with:
python-version: |
3.9
3.10
3.11
check-latest: true
- name: Get Version
id: version
shell: bash
run: |
version="$(python3 ./.github/actions/get_version.py)"
echo "version=$version" >> $GITHUB_OUTPUT
- name: Is Tag exists
uses: mukunku/tag-exists-action@v1.3.0
id: checkTag
with:
tag: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: ZIP Component Dir
if: steps.checkTag.outputs.exists == 'false'
run: |
cd ${{ github.workspace }}/custom_components/ecotrend_ista
zip -r ecotrend_ista.zip ./
- name: Upload zip to release
if: steps.checkTag.outputs.exists == 'false'
uses: svenstaro/upload-release-action@2.7.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/custom_components/ecotrend_ista/ecotrend_ista.zip
asset_name: ecotrend_ista.zip
tag: ${{ steps.version.outputs.version }}
overwrite: true