Implement automatic CDN publishing (#403)

This commit is contained in:
Ken Van Hoeylandt
2025-10-31 23:39:41 +01:00
committed by GitHub
parent 9ae3e48600
commit 569cce38fa
6 changed files with 496 additions and 2 deletions
+33 -1
View File
@@ -3,6 +3,8 @@ on:
push:
branches:
- main
tags:
- v*
pull_request:
types: [ opened, synchronize, reopened ]
@@ -57,8 +59,38 @@ jobs:
Bundle:
runs-on: ubuntu-latest
needs: [ Build ]
if: (github.event_name == 'pull_request' && startsWith(github.head_ref, 'release'))
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@v4
- name: "Bundle"
uses: ./.github/actions/bundle-firmware
PublishSnapshot:
runs-on: ubuntu-latest
needs: [ Bundle ]
if: (github.event_name == 'push' && github.ref == 'refs/heads/main')
steps:
- uses: actions/checkout@v4
- name: "Publish Snapshot"
env:
CDN_ID: ${{ secrets.CDN_ID }}
CDN_TOKEN_NAME: ${{ secrets.CDN_TOKEN_NAME }}
CDN_TOKEN_VALUE: ${{ secrets.CDN_TOKEN_VALUE }}
uses: ./.github/actions/publish-firmware
with:
cdn_version: snapshot
PublishRelease:
runs-on: ubuntu-latest
needs: [ Bundle ]
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@v4
- name: "Publish Stable"
env:
CDN_ID: ${{ secrets.CDN_ID }}
CDN_TOKEN_NAME: ${{ secrets.CDN_TOKEN_NAME }}
CDN_TOKEN_VALUE: ${{ secrets.CDN_TOKEN_VALUE }}
uses: ./.github/actions/publish-firmware
with:
cdn_version: stable