Skip to content

Commit

Permalink
fix: fallback to empty ref
Browse files Browse the repository at this point in the history
  • Loading branch information
mdvorak committed Mar 5, 2022
1 parent 1f43779 commit 7991d4c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ permissions:

env:
PACKAGE_NAME: app_template
TARGET_REF: ${{ inputs.ref || github.ref }}

jobs:
# NOTE make sure release exists before concurrent matrix build, to avoid race-conditions
Expand All @@ -26,7 +25,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TARGET_REF }}
tag_name: ${{ inputs.ref }}
generate_release_notes: true

build:
Expand All @@ -45,7 +44,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.TARGET_REF }}
ref: ${{ inputs.ref }}

- name: Force SoftAP Provisioning
if: ${{ matrix.idf_target == 'esp32s2' }}
Expand All @@ -70,7 +69,7 @@ jobs:
- name: Upload assets
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TARGET_REF }}
tag_name: ${{ inputs.ref }}
files: build/upload/*
fail_on_unmatched_files: true

Expand All @@ -83,7 +82,7 @@ jobs:
if: ${{ needs.build.result == 'success' }}
uses: softprops/action-gh-release@master # TODO use stable when append_body is supported
with:
tag_name: ${{ env.TARGET_REF }}
tag_name: ${{ inputs.ref }}
append_body: true
body: |
Expand All @@ -93,7 +92,7 @@ jobs:
if: ${{ needs.build.result != 'success' }}
uses: softprops/action-gh-release@master # TODO use stable when append_body is supported
with:
tag_name: ${{ env.TARGET_REF }}
tag_name: ${{ inputs.ref }}
append_body: true
body: |
Expand Down

0 comments on commit 7991d4c

Please sign in to comment.