Skip to content

Publish release

Publish release #147

Workflow file for this run

name: Publish release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v4
- name: Get tag
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Set up Python 3.11
uses: actions/[email protected]
with:
python-version: "3.11"
- name: Get version
id: version
uses: home-assistant/actions/helpers/version@master
- name: Patch manifest and zip
run: |
sed -i 's/0.0.0/${{ steps.vars.outputs.tag }}/' custom_components/mass/manifest.json
cd custom_components/mass/
zip ../../mass.zip ./* translations/* -x '.*'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./mass.zip
asset_name: mass.zip
tag: ${{ github.ref }}