Create release tag #5
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: Create release tag | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'custom_components/Hass-Lynk-Co/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/Hass-Lynk-Co/manifest.json) | |
echo "Creating tag for version v$VERSION" | |
git tag "v$VERSION" | |
git push origin "v$VERSION" |