From 86b8aaa587cbdcbe00e22494213c5224818a2160 Mon Sep 17 00:00:00 2001 From: nated0g Date: Fri, 29 Apr 2022 11:22:18 -0700 Subject: [PATCH] Changed to single workflow --- .github/workflows/actions.yml | 30 ++++++++++++++++----------- .github/workflows/trigger-release.yml | 24 --------------------- 2 files changed, 18 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/trigger-release.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 768d3f3..f579fa2 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -1,18 +1,24 @@ on: push +env: + project_path: 'examples/simple' + jobs: build: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: esp-idf build - uses: espressif/esp-idf-ci-action@main - with: - esp_idf_version: v4.4 - target: esp32 - path: 'examples/simple' \ No newline at end of file + - name: Checkout repo + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: esp-idf build + uses: espressif/esp-idf-ci-action@main + with: + esp_idf_version: v4.4 + target: esp32 + path: ${{env.project_path}} + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{env.project_path}}/build/*.bin \ No newline at end of file diff --git a/.github/workflows/trigger-release.yml b/.github/workflows/trigger-release.yml deleted file mode 100644 index 54ed8a9..0000000 --- a/.github/workflows/trigger-release.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: workflow_dispatch - -env: - project_path: 'examples/simple' -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: esp-idf build - uses: espressif/esp-idf-ci-action@main - with: - esp_idf_version: v4.4 - target: esp32 - path: ${{env.project_path}} - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: ${{env.project_path}}/build/*.bin \ No newline at end of file