Release #27
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: Check out repository | |
uses: actions/checkout@v2 | |
# Only good for yaml and json: | |
- uses: pocket-apps/action-update-version@v1 | |
with: | |
files: custom_components/apiEnedis/manifest.json | |
version-regexp: \d+\.\d+\.\d+(\.\d+)? | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Get version | |
# id: version | |
# uses: home-assistant/actions/helpers/version@master | |
# - name: Set version number | |
# run: >- | |
# python3 | |
# ${{ github.workspace }}/.github/scripts/update_hacs_manifest.py | |
# --version ${{ steps.version.outputs.version }} | |
# - uses: stefanzweifel/git-auto-commit-action@v4 | |
# with: | |
# commit_message: \[Bot\] Release - Update V ${{ | |
# steps.version.outputs.version }} | |
# commit_user_name: release | |
# commit_user_email: release@nill | |
# commit_author: release bot <release> | |
# | |
# Get the tag name | |
- name: Get the Ref | |
id: get-ref | |
uses: ankitvgupta/ref-to-tag-action@master | |
with: | |
ref: ${{ github.ref }} | |
head_ref: ${{ github.head_ref }} | |
# Move the tag | |
# - name: Move Release Tag to include updated manifest | |
# uses: richardsimko/update-tag@v1 | |
# with: | |
# tag_name: ${{ steps.get-ref.outputs.tag }} | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Move the tag | |
- name: Move Release Tag to include updated manifest | |
uses: EndBug/latest-tag@latest | |
# Continue anyway if moving the tag failes (protected | |
# branch for instance) - the ZIP will be fine. | |
continue-on-error: true | |
with: | |
tag-name: ${{ steps.get-ref.outputs.tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create zip | |
run: | | |
cd custom_components/apiEnedis | |
zip apiEnedis.zip -r ./ | |
- name: Upload zip to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./custom_components/apiEnedis/apiEnedis.zip | |
asset_name: apiEnedis.zip | |
tag: ${{ github.ref }} | |
overwrite: true |