diff --git a/.github/workflows/building.yaml b/.github/workflows/building.yaml index cc99392..34e21f7 100644 --- a/.github/workflows/building.yaml +++ b/.github/workflows/building.yaml @@ -3,8 +3,9 @@ name: 'Building release package' on: workflow_dispatch: push: - tags: - - 'v*' + branches: + - main + pull_request: permissions: contents: read @@ -14,12 +15,12 @@ concurrency: cancel-in-progress: true jobs: - release: + build: runs-on: ubuntu-latest steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4 @@ -37,9 +38,6 @@ jobs: - name: Build test package run: hatch -v build -t sdist - - name: Build the release candidate package - run: hatch -v build -t zipped-directory - - name: Log package content run: tar -tvf dist/econnect_metronet-$PKG_VERSION.tar.gz diff --git a/.github/workflows/hassfest.yaml b/.github/workflows/hassfest.yaml index 9b20ba8..61871a0 100644 --- a/.github/workflows/hassfest.yaml +++ b/.github/workflows/hassfest.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Test hassfest uses: home-assistant/actions/hassfest@master diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index 901f2c2..b320837 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 73b948e..0ce858b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,33 +10,14 @@ concurrency: cancel-in-progress: true jobs: - release_zip_file: - name: Publish integration zip file asset + release: + name: HACS release runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout the repository - uses: actions/checkout@v3.5.3 - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Upgrade pip and install required tools - run: | - pip install --upgrade pip - pip install hatch - - - name: Detect package version - run: echo "PKG_VERSION=$(hatch version)" >> "$GITHUB_ENV" - - - name: Build release package (tar) - run: hatch -v build -t sdist - - - name: Build release package (zip) - run: hatch -v build -t zipped-directory + uses: actions/checkout@v4 - name: Build release package (HACS) run: | @@ -47,6 +28,4 @@ jobs: uses: softprops/action-gh-release@v0.1.15 with: files: | - ${{ github.workspace }}/dist/econnect_metronet-$PKG_VERSION.tar.gz - ${{ github.workspace }}/dist/econnect_metronet-$PKG_VERSION.zip ${{ github.workspace }}/custom_components/econnect_metronet/hacs_econnect_metronet.zip diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 7d432bb..a223817 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -22,7 +22,7 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4 diff --git a/pyproject.toml b/pyproject.toml index 276a9ae..b14e06d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,6 @@ [build-system] requires = [ "hatchling", - "hatch-zipped-directory", ] build-backend = "hatchling.build" @@ -82,6 +81,3 @@ asyncio_mode = "auto" [tool.hatch.build.targets.sdist] only-include = ["custom_components/econnect_metronet"] - -[tool.hatch.build.targets.zipped-directory] -only-include = ["custom_components/econnect_metronet"]