Skip to content

Commit

Permalink
[#26] Fix broken HA addons update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Senart committed Jan 10, 2025
1 parent 477b9d4 commit 9a82160
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 24 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
package-version:
description: 'Package version'
description: "Package version"
required: false
default: ""
type: string
Expand All @@ -16,7 +16,6 @@ env:
DEFAULT_PYTHON_VERSION: "3.12"

jobs:

#----------------------------------------------
# Collect information
information:
Expand Down Expand Up @@ -90,8 +89,8 @@ jobs:
- name: Replace version
run: |
envsubst < pyproject.template.toml > pyproject.toml
envsubst < addons/gazpar2haws/config.template.yaml > addons/gazpar2haws/config.yaml
envsubst < addons/gazpar2haws/build.template.yaml > addons/gazpar2haws/build.yaml
envsubst < addons/gazpar2haws/templates/config.template.yaml > addons/gazpar2haws/config.yaml
envsubst < addons/gazpar2haws/templates/build.template.yaml > addons/gazpar2haws/build.yaml
#----------------------------------------------
# Commit the changes
Expand All @@ -100,7 +99,7 @@ jobs:
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add pyproject.toml addons/gazpar2haws/config.yaml addons/gazpar2haws/build.yaml
git add pyproject.toml addons/gazpar2haws/config.yaml addons/gazpar2haws/build.yaml
git commit -m "Upgrade version to ${PACKAGE_VERSION}"
git push
Expand Down Expand Up @@ -140,30 +139,30 @@ jobs:
path: dist/

#----------------------------------------------
# Publish to PyPI
# Publish to PyPI
publish-to-pypi:
name: Publish to PyPI
runs-on: "ubuntu-latest"
needs: build
if: ${{ startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/release/') }}
environment:
name: pypi
url: https://pypi.org/p/gazpar2haws
name: pypi
url: https://pypi.org/p/gazpar2haws
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download the package
uses: actions/download-artifact@v4
with:
name: gazpar2haws
path: dist/
- name: Publish 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
- name: Download the package
uses: actions/download-artifact@v4
with:
name: gazpar2haws
path: dist/
- name: Publish 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true

#----------------------------------------------
# Publish to TestPyPI
# Publish to TestPyPI
publish-to-testpypi:
name: Publish to TestPyPI
runs-on: "ubuntu-latest"
Expand All @@ -173,8 +172,8 @@ jobs:
name: testpypi
url: https://test.pypi.org/p/gazpar2haws
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download the package
uses: actions/download-artifact@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.9] - 2025-01-10

### Fixed

[#26]((https://github.com/ssenart/gazpar2haws/issues/26): Fix broken HA addons update.

## [0.1.8] - 2025-01-10

### Added

[#20](https://github.com/ssenart/gazpar2haws/issues/20): Automate build, package, publish with Github Actions
[#20](https://github.com/ssenart/gazpar2haws/issues/20): Automate build, package, publish with Github Actions.

## [0.1.7] - 2025-01-05

Expand Down
1 change: 0 additions & 1 deletion addons/gazpar2haws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FROM $BUILD_FROM
ARG GAZPAR2HAWS_VERSION

RUN apk add --no-cache gettext
RUN apk add --no-cache py3-pip

ENV PIP_BREAK_SYSTEM_PACKAGES=1

Expand Down
2 changes: 1 addition & 1 deletion addons/gazpar2haws/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ labels:
org.opencontainers.image.source: "https://github.com/ssenart/gazpar2haws"
org.opencontainers.image.licenses: "MIT"
args:
GAZPAR2HAWS_VERSION: "0.1.8"
GAZPAR2HAWS_VERSION: "0.1.8"
File renamed without changes.
File renamed without changes.

0 comments on commit 9a82160

Please sign in to comment.