Skip to content

Commit

Permalink
workflow: firmare - create release in earlier step
Browse files Browse the repository at this point in the history
  • Loading branch information
gtxaspec committed Dec 28, 2024
1 parent 10991da commit 8ebb8b2
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@ jobs:
ref: "master"
fetch-depth: "1"

- name: Create release tag
continue-on-error: true
run: |
TAG_NAME="${{ env.TAG_NAME }}"
if ! gh api repos/${{ github.repository }}/git/ref/tags/$TAG_NAME &>/dev/null; then
git tag "$TAG_NAME"
git push origin "$TAG_NAME"
else
echo "Tag $TAG_NAME already exists."
fi
- name: Create release
continue-on-error: true
run: |
TAG_NAME="${{ env.TAG_NAME }}"
if ! gh release view "$TAG_NAME" --repo "${{ github.repository }}" &>/dev/null; then
echo "Release $TAG_NAME does not exist. Creating pre-release."
gh release create "$TAG_NAME" --repo "${{ github.repository }}" --title "$TAG_NAME" --notes "pre-release: \`\`\`$TAG_NAME\`\`\` is currently being built, please wait..." --prerelease
else
echo "Release $TAG_NAME already exists."
fi
- name: Send build start notifcation via Telegram
if: env.TG_DISABLED == 'false'
run: |
Expand Down Expand Up @@ -277,28 +299,6 @@ jobs:
${{ env.UPDATE_FW }}
${{ env.UPDATE_FW_SHA }}
- name: Create release tag
continue-on-error: true
run: |
TAG_NAME="${{ env.TAG_NAME }}"
if ! gh api repos/${{ github.repository }}/git/ref/tags/$TAG_NAME &>/dev/null; then
git tag "$TAG_NAME"
git push origin "$TAG_NAME"
else
echo "Tag $TAG_NAME already exists."
fi
- name: Create release
continue-on-error: true
run: |
TAG_NAME="${{ env.TAG_NAME }}"
if ! gh release view "$TAG_NAME" --repo "${{ github.repository }}" &>/dev/null; then
echo "Release $TAG_NAME does not exist. Creating pre-release."
gh release create "$TAG_NAME" --repo "${{ github.repository }}" --title "$TAG_NAME" --notes "pre-release: \`\`\`$TAG_NAME\`\`\` is currently being built, please wait..." --prerelease
else
echo "Release $TAG_NAME already exists."
fi
- name: Upload ${{ matrix.thingino-version }} to release
uses: softprops/[email protected]
with:
Expand Down

0 comments on commit 8ebb8b2

Please sign in to comment.