Skip to content

Create release tag

Create release tag #15

Workflow file for this run

name: Create release tag
on:
push:
branches:
- main
paths:
- 'custom_components/lynkco/manifest.json'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.HASSLYNKCORELEASEBOTID }}
private-key: ${{ secrets.HASSLYNKCORELEASEBOTPRIVATEKEY }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Configure git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Extract version and create tag
run: |
VERSION=$(jq -r '.version' custom_components/lynkco/manifest.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Creating tag for version v$VERSION"
git tag "v$VERSION"
git push origin "v$VERSION"
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} # Set the GitHub App token as GITHUB_TOKEN environment variable
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: false