Skip to content

Commit

Permalink
Fix for new builds update URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Nov 2, 2024
1 parent 39a3422 commit c3e9ddd
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
41 changes: 24 additions & 17 deletions .github/workflow_data/devbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import json
import os

artifact_tgz = f"{os.environ['INDEXER_URL']}/firmware/dev/{os.environ['ARTIFACT_TAG']}.tgz"
artifact_sdk = f"{os.environ['INDEXER_URL']}/firmware/dev/{os.environ['ARTIFACT_TAG'].replace('update', 'sdk')}.zip"
base_url = f"{os.environ['INDEXER_URL']}/builds/firmware/dev"
artifact_tgz = f"{base_url}/{os.environ['ARTIFACT_TAG']}.tgz"
artifact_sdk = f"{base_url}/{os.environ['ARTIFACT_TAG'].replace('update', 'sdk')}.zip"
artifact_lab = f"https://lab.flipper.net/?url={artifact_tgz}&channel=dev-cfw&version={os.environ['VERSION_TAG']}"


Expand Down Expand Up @@ -41,28 +42,34 @@
"fields": [
{
"name": "Code Diff:",
"value": "\n".join([
f"[From last release ({release} to {after[:8]})]({compare}/{release}...{after})",
f"[From last build ({before[:8]} to {after[:8]})]({compare}/{before}...{after})",
])
"value": "\n".join(
[
f"[From last release ({release} to {after[:8]})]({compare}/{release}...{after})",
f"[From last build ({before[:8]} to {after[:8]})]({compare}/{before}...{after})",
]
),
},
{
"name": "Changelog:",
"value": "\n".join([
f"[Since last release ({release})]({event['repository']['html_url']}/blob/{after}/CHANGELOG.md)",
])
"value": "\n".join(
[
f"[Since last release ({release})]({event['repository']['html_url']}/blob/{after}/CHANGELOG.md)",
]
),
},
{
"name": "Firmware Artifacts:",
"value": "\n".join([
f"- [🖥️ Install with Web Updater](https://momentum-fw.dev/update)",
f"- [☁️ Open in Flipper Lab/App]({artifact_lab})",
f"- [🐬 Download Firmware TGZ]({artifact_tgz})",
f"- [🛠️ SDK (for development)]({artifact_sdk})",
])
}
"value": "\n".join(
[
f"- [🖥️ Install with Web Updater](https://momentum-fw.dev/update)",
f"- [☁️ Open in Flipper Lab/App]({artifact_lab})",
f"- [🐬 Download Firmware TGZ]({artifact_tgz})",
f"- [🛠️ SDK (for development)]({artifact_sdk})",
]
),
},
],
"timestamp": dt.datetime.utcnow().isoformat()
"timestamp": dt.datetime.utcnow().isoformat(),
}
],
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_data/release.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## ⬇️ Download
>### [🖥️ Web Updater (chrome)](https://momentum-fw.dev/update) [recommended]
>### [☁️ Flipper Lab/App (chrome/mobile)](https://lab.flipper.net/?url=https://up.momentum-fw.dev/firmware/{VERSION_TAG}/flipper-z-f7-update-{VERSION_TAG}.tgz&channel=release-cfw&version={VERSION_TAG})
>### [☁️ Flipper Lab/App (chrome/mobile)](https://lab.flipper.net/?url=https://up.momentum-fw.dev/builds/firmware/{VERSION_TAG}/flipper-z-f7-update-{VERSION_TAG}.tgz&channel=release-cfw&version={VERSION_TAG})
>### [🐬 qFlipper Package (.tgz)](https://github.com/Next-Flip/Momentum-Firmware/releases/download/{VERSION_TAG}/flipper-z-f7-update-{VERSION_TAG}.tgz)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
**Compiled ${{ matrix.target }} firmware for commit `${{steps.names.outputs.commit_sha}}`:**
- [☁️ Flipper Lab/App](https://lab.flipper.net/?url=${{secrets.INDEXER_URL}}/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz&channel=mntm-${{steps.names.outputs.branch_name}}&version=${{steps.names.outputs.commit_sha}})
- [📦 qFlipper Package](${{secrets.INDEXER_URL}}/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz)
- [☁️ Flipper Lab/App](https://lab.flipper.net/?url=${{secrets.INDEXER_URL}}/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz&channel=mntm-${{steps.names.outputs.branch_name}}&version=${{steps.names.outputs.commit_sha}})
- [📦 qFlipper Package](${{secrets.INDEXER_URL}}/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz)
edit-mode: replace

- name: Send devbuild webhook
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- name: "Download release assets from tag build"
run: |
set -e
wget "${{ secrets.INDEXER_URL }}"/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-update-${{ github.event.release.tag_name }}.tgz
wget "${{ secrets.INDEXER_URL }}"/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-update-${{ github.event.release.tag_name }}.zip
wget "${{ secrets.INDEXER_URL }}"/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-sdk-${{ github.event.release.tag_name }}.zip
wget "${{ secrets.INDEXER_URL }}"/builds/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-update-${{ github.event.release.tag_name }}.tgz
wget "${{ secrets.INDEXER_URL }}"/builds/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-update-${{ github.event.release.tag_name }}.zip
wget "${{ secrets.INDEXER_URL }}"/builds/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-sdk-${{ github.event.release.tag_name }}.zip
- name: "Update release with assets and notes"
uses: "softprops/action-gh-release@v1"
Expand Down

0 comments on commit c3e9ddd

Please sign in to comment.