Skip to content

Commit

Permalink
ci(release): all packages are built during the release action (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
palazzem authored Oct 6, 2023
1 parent e47320c commit a53446d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/building.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ 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

Expand All @@ -45,13 +48,3 @@ jobs:

- name: Test if the package is built correctly
run: python -c "import custom_components.econnect_metronet"

- name: Build the release package
run: hatch -v build -t zipped-directory

- name: Upload release archive
uses: actions/upload-artifact@v3
with:
name: econnect-metronet-${{ env.PKG_VERSION }}.zip
path: dist/econnect_metronet-${{ env.PKG_VERSION }}.zip
if-no-files-found: error
18 changes: 15 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,24 @@ jobs:
- name: Checkout the repository
uses: actions/[email protected]

- name: Build Integration ZIP package
- 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

- name: Build release package (HACS)
run: |
cd ${{ github.workspace }}/custom_components/econnect_metronet
zip hacs_econnect_metronet.zip -r ./
- name: Upload ZIP package release
- name: Upload release packages
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/custom_components/econnect_metronet/hacs_econnect_metronet.zip
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

0 comments on commit a53446d

Please sign in to comment.