Skip to content

Commit

Permalink
Fix release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Jul 9, 2022
1 parent b4e5f39 commit 475ca06
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,42 @@ jobs:
with:
files: ${{ env.basedir }}/${{ env.package }}.zip

release-notes:
name: "Compose release notes"
needs: release
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v3

- working-directory: ./custom_components
run: |
echo "release_version=$(git describe --tags | sed s/v//)" >> $GITHUB_ENV
- name: "Set up Python"
if: env.release_version != '' && success()
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: "Cache pip"
if: env.release_version != '' && success()
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: "Install requirements"
if: env.release_version != '' && success()
run: |
python3 -m pip install setuptools wheel
python3 -m pip install -r ./requirements-dev.txt
- name: "Update release notes"
if: env.release_version != '' && success()
run: python3 ./bin/gen_releasenotes --token ${{ secrets.GITHUB_TOKEN }} --repo ${{ github.repository }} --release ${{ env.release_version }}

0 comments on commit 475ca06

Please sign in to comment.