Skip to content

Release

Release #428

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [Validate]
types: [completed]
permissions:
contents: write
pull-requests: write
jobs:
release-please:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
outputs:
exists: ${{ steps.release.outputs.exists }}
steps:
-
name: Release-Please
id: release
uses: google-github-actions/release-please-action@v3
with:
command: manifest
default-branch: main
package-name: ha_easgen
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
- name: "Checkout the repository"
uses: "actions/checkout@v3.5.2"
with:
fetch-depth: 0
if: ${{ steps.release.outputs.release_created }}
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
if: ${{ steps.release.outputs.release_created }}
- name: Patch manifest and zip
run: |
yq -i -o json '.version="${{ steps.previoustag.outputs.tag }}"' \
"${{ github.workspace }}/custom_components/ha_easgen/manifest.json"
if: ${{ steps.release.outputs.release_created }}
- name: "Archiving the integration directory"
shell: "bash"
run: |
cd "${{ github.workspace }}/custom_components/ha_easgen"
zip ha_easgen.zip -r ./
if: ${{ steps.release.outputs.release_created }}
- name: "Upload the ZIP file to the release"
uses: softprops/action-gh-release@v0.1.15
with:
files: ${{ github.workspace }}/custom_components/ha_easgen/ha_easgen.zip
tag_name: ${{ steps.previoustag.outputs.tag }}
if: ${{ steps.release.outputs.release_created }}