mirror of
https://github.com/esphome/home-assistant-addon.git
synced 2024-12-20 16:27:41 +01:00
a45a9f6d8a
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: Publish Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: The version to release
|
|
required: true
|
|
|
|
jobs:
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v3.3.0
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
- run: pip install -r script/requirements.txt
|
|
- run: script/bump-version.py ${{ github.event.inputs.version }}
|
|
- name: Commit version bump
|
|
id: commit_version
|
|
run: |
|
|
git config user.name esphomebot
|
|
git config user.email esphome@nabucasa.com
|
|
git add .
|
|
git commit -m "Bump version to ${{ github.event.inputs.version }}"
|
|
git push
|
|
COMMIT=$(git rev-parse HEAD)
|
|
echo "::set-output name=commit_sha::${COMMIT}"
|
|
- if: ${{ contains(github.event.inputs.version, 'b') }}
|
|
name: Create Beta Release
|
|
uses: actions/create-release@v1.1.4
|
|
continue-on-error: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.event.inputs.version }}
|
|
release_name: ${{ github.event.inputs.version }}
|
|
body: 'See https://beta.esphome.io/changelog/index.html'
|
|
prerelease: true
|
|
commitish: ${{ steps.commit_version.outputs.commit_sha }}
|
|
- if: ${{ !contains(github.event.inputs.version, 'b') }}
|
|
name: Create Stable Release
|
|
uses: actions/create-release@v1.1.4
|
|
continue-on-error: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.event.inputs.version }}
|
|
release_name: ${{ github.event.inputs.version }}
|
|
body: 'See https://esphome.io/changelog/index.html'
|
|
prerelease: false
|
|
commitish: ${{ steps.commit_version.outputs.commit_sha }}
|