chore(deps): update hacs/action digest to 6f81caf (#158) #14
This file contains hidden or 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 Please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| version: ${{ steps.release.outputs.version }} | |
| upload_url: ${{ steps.release.outputs.upload_url }} | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3 | |
| with: | |
| egress-policy: audit | |
| - name: Run release-please | |
| id: release | |
| uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 | |
| with: | |
| config-file: .release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| upload-assets: | |
| name: Upload Release Assets | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Create integration zip | |
| run: | | |
| VERSION="${{ needs.release-please.outputs.version }}" | |
| echo "Creating zip for version ${VERSION}" | |
| # Create zip from inside the integration directory | |
| cd "${{ github.workspace }}/custom_components/autopi" | |
| zip -r "autopi.zip" ./ -x "*.pyc" "*/__pycache__/*" "*/.DS_Store" | |
| # Move zip back to workspace | |
| mv "autopi.zip" "${GITHUB_WORKSPACE}/" | |
| - name: Upload zip to release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION="${{ needs.release-please.outputs.version }}" | |
| TAG_NAME="${{ needs.release-please.outputs.tag_name }}" | |
| ZIP_FILE="autopi.zip" | |
| echo "Uploading ${ZIP_FILE} to release ${TAG_NAME}" | |
| gh release upload "${TAG_NAME}" "${ZIP_FILE}" --clobber | |
| - name: Comment on release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| TAG_NAME="${{ needs.release-please.outputs.tag_name }}" | |
| VERSION="${{ needs.release-please.outputs.version }}" | |
| gh release view "${TAG_NAME}" --json body -q '.body' > release_body.txt | |
| cat >> release_body.txt <<EOF | |
| --- | |
| ## Installation | |
| Download \`autopi.zip\` and extract to your Home Assistant \`custom_components\` directory. | |
| Or use HACS to install this integration. | |
| EOF | |
| gh release edit "${TAG_NAME}" --notes-file release_body.txt |