2020-07-28 23:20:29 +02:00
|
|
|
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
|
2020-07-28 23:20:29 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
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
|
2020-07-28 23:20:29 +02:00
|
|
|
git add .
|
2022-02-10 20:05:04 +01:00
|
|
|
git commit -m "Bump version to ${{ github.event.inputs.version }}"
|
2020-07-28 23:20:29 +02:00
|
|
|
git push
|
2020-09-14 03:39:16 +02:00
|
|
|
COMMIT=$(git rev-parse HEAD)
|
|
|
|
echo "::set-output name=commit_sha::${COMMIT}"
|
2020-07-28 23:20:29 +02:00
|
|
|
- if: ${{ contains(github.event.inputs.version, 'b') }}
|
|
|
|
name: Create Beta Release
|
|
|
|
uses: actions/create-release@v1
|
2021-12-21 04:32:49 +01:00
|
|
|
continue-on-error: true
|
2020-07-28 23:20:29 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2022-02-21 01:37:27 +01:00
|
|
|
tag_name: ${{ github.event.inputs.version }}
|
2020-07-28 23:20:29 +02:00
|
|
|
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 }}
|
2020-07-28 23:20:29 +02:00
|
|
|
- if: ${{ !contains(github.event.inputs.version, 'b') }}
|
|
|
|
name: Create Stable Release
|
|
|
|
uses: actions/create-release@v1
|
2021-12-21 04:32:49 +01:00
|
|
|
continue-on-error: true
|
2020-07-28 23:20:29 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2022-02-21 01:37:27 +01:00
|
|
|
tag_name: ${{ github.event.inputs.version }}
|
2020-07-28 23:20:29 +02:00
|
|
|
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 }}
|