home-assistant-addon/.github/workflows/bump-version.yml

55 lines
1.8 KiB
YAML
Raw Normal View History

name: Publish Release
on:
workflow_dispatch:
inputs:
version:
description: The version to release
required: true
jobs:
create-release:
runs-on: ubuntu-latest
2021-12-21 04:35:39 +01:00
continue-on-error: true
steps:
2022-07-06 22:08:00 +02:00
- uses: actions/checkout@v3.0.2
- 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 }}
2020-09-14 03:39:16 +02:00
- name: Commit version bump
id: commit_version
run: |
2020-07-29 20:55:58 +02:00
git config user.name esphomebot
2021-05-03 01:49:37 +02:00
git config user.email esphome@nabucasa.com
git add .
2022-02-10 20:05:04 +01:00
git commit -m "Bump version to ${{ github.event.inputs.version }}"
git push
2020-09-14 03:39:16 +02:00
COMMIT=$(git rev-parse HEAD)
echo "::set-output name=commit_sha::${COMMIT}"
- if: ${{ contains(github.event.inputs.version, 'b') }}
name: Create Beta Release
2022-07-06 22:08:00 +02:00
uses: actions/create-release@v1.1.4
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
2022-02-21 01:37:27 +01:00
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: 'See https://beta.esphome.io/changelog/index.html'
prerelease: true
2021-05-03 01:49:37 +02:00
commitish: ${{ steps.commit_version.outputs.commit_sha }}
- if: ${{ !contains(github.event.inputs.version, 'b') }}
name: Create Stable Release
2022-07-06 22:08:00 +02:00
uses: actions/create-release@v1.1.4
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
2022-02-21 01:37:27 +01:00
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: 'See https://esphome.io/changelog/index.html'
prerelease: false
2021-05-03 01:49:37 +02:00
commitish: ${{ steps.commit_version.outputs.commit_sha }}