From 10f4c5d56818b5c7b84881dd1ad060d6be47966d Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Sun, 3 Oct 2021 01:39:31 +0000 Subject: [PATCH 1/4] Test action --- .github/workflows/build-deb.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index d5c4071..f6ddd8c 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -3,6 +3,7 @@ name: Build Deb Package # yamllint disable-line rule:truthy on: + push: workflow_dispatch: release: types: ["published"] @@ -10,14 +11,7 @@ jobs: build-deb-package: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@v2 - - name: Build Debian package - uses: dawidd6/action-debian-package@v1 - with: - # Optional, relative to workspace directory - source_directory: homeassistant-supervised - # # Optional, value from `debian/changelog` is used if not defined - # os_distribution: bullseye - # # Optional, target architecture, defaults to amd64 - # cpu_architecture: all \ No newline at end of file + - run: chmod 755 homeassistant-supervised/DEBIAN/p* + - run: dpkg-deb --build --root-owner-group homeassistant-supervised \ No newline at end of file From dfb5f17d2998682f109310a1814053278cf3df4a Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Sun, 3 Oct 2021 01:44:26 +0000 Subject: [PATCH 2/4] test workflow --- .github/workflows/build-deb.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index f6ddd8c..e0edb48 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -14,4 +14,24 @@ jobs: - name: Checkout uses: actions/checkout@v2 - run: chmod 755 homeassistant-supervised/DEBIAN/p* - - run: dpkg-deb --build --root-owner-group homeassistant-supervised \ No newline at end of file + - run: dpkg-deb --build --root-owner-group homeassistant-supervised + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./homeassistant-supervised.deb + asset_name: homeassistant-supervised.deb + asset_content_type: application/octet-stream \ No newline at end of file From 7d258833000351f10723b7b343d7b5ff1a91ea43 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Sun, 3 Oct 2021 20:18:10 +0000 Subject: [PATCH 3/4] new action --- .github/workflows/build-deb.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index e0edb48..0d26f83 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -15,23 +15,8 @@ jobs: uses: actions/checkout@v2 - run: chmod 755 homeassistant-supervised/DEBIAN/p* - run: dpkg-deb --build --root-owner-group homeassistant-supervised - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./homeassistant-supervised.deb - asset_name: homeassistant-supervised.deb - asset_content_type: application/octet-stream \ No newline at end of file + files: homeassistant-supervised.deb \ No newline at end of file From 9a29c0a258fb73e8d7c0f4383e8e3edf3d086f02 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Sun, 3 Oct 2021 20:21:40 +0000 Subject: [PATCH 4/4] get rid of push --- .github/workflows/build-deb.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index 0d26f83..3be2eed 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -3,7 +3,6 @@ name: Build Deb Package # yamllint disable-line rule:truthy on: - push: workflow_dispatch: release: types: ["published"]