Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

Update dependency RestrictedPython to v8.5 (#5506) #1373

Update dependency RestrictedPython to v8.5 (#5506)

Update dependency RestrictedPython to v8.5 (#5506) #1373

Workflow file for this run

name: Publish
on:
release:
types:
- published
push:
branches:
- main
concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
release_zip_file:
name: Publish HACS zip file asset
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: 🛠️ Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: 🔢 Validate version
if: ${{ github.event_name == 'release' }}
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
if [ -z "$VERSION" ]; then
echo "::error::Release tag_name is empty"
exit 1
fi
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+((a|b|rc)[0-9]+)?$ ]]; then
echo "::error::Release tag_name '$VERSION' is not a valid version"
exit 1
fi
- name: 🔢 Get version
if: ${{ github.event_name == 'release' }}
id: version
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
printf 'version=%s\n' "$VERSION" >> "$GITHUB_OUTPUT"
- name: 🔢 Set version number
if: ${{ github.event_name == 'release' }}
run: |
sed -i "/MINIMUM_HA_VERSION = /c\MINIMUM_HA_VERSION = \"$(jq .homeassistant -r ${{ github.workspace }}/hacs.json)\"" ${{ github.workspace }}/custom_components/hacs/const.py
python3 ${{ github.workspace }}/scripts/update/manifest.py --version ${{ steps.version.outputs.version }}
- name: ⏬ Download HACS frontend
run: ${{ github.workspace }}/scripts/install/frontend
- name: 📤 Upload zip to action
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ github.event_name == 'push' }}
with:
name: hacs
path: ${{ github.workspace }}/custom_components/hacs
retention-days: 7
# Pack the HACS dir as a zip and upload to the release
- name: 📦 ZIP HACS Dir
if: ${{ github.event_name == 'release' }}
run: |
cd ${{ github.workspace }}/custom_components/hacs
zip hacs.zip -r ./
- name: 📤 Upload zip to release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
if: ${{ github.event_name == 'release' }}
with:
files: ${{ github.workspace }}/custom_components/hacs/hacs.zip
Morty Proxy This is a proxified and sanitized view of the page, visit original site.