Skip to content

1.0.1

1.0.1 #4

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release_zip_file:
name: Prepare release asset
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v1
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: "Set version numbmer"
run: |
sed -i '/VERSION = /c\VERSION = "${{ steps.get_version.outputs.VERSION }}"' ${{ github.workspace }}/custom_components/gasbuddy/const.py
sed -i '/version/c\ \"version\": \"${{ steps.get_version.outputs.VERSION }}\",' ${{ github.workspace }}/custom_components/gasbuddy/manifest.json
# Pack the ha-gasbuddy dir as a zip and upload to the release
- name: Create Zip File
run: |
cd ${{ github.workspace }}/custom_components/gasbuddy
zip ha-gasbuddy.zip -r ./
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/custom_components/gasbuddy/ha-gasbuddy.zip
asset_name: ha-gasbuddy.zip
tag: ${{ github.ref }}
overwrite: true