Danger Zone: promote latest staged fw to production #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Danger Zone: promote latest staged fw to production" | |
on: | |
workflow_dispatch: | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
name: Publish new release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Compare releases | |
# we check for dongle firmware, as this is considered the leading version | |
run: if cmp -s "staging/dongle_version.txt" "production/dongle_version.txt"; then exit 1; fi | |
- name: Overwrite production artifacts | |
run: | | |
cp staging/* production/ | |
- name: Commit changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Sessy CI" | |
git add production/* | |
git commit -m "New production release" | |
git push | |
release: | |
name: Publish new release | |
uses: ChargedBV/sessy-updates/.github/workflows/release.yml@main | |
needs: tag | |
cloud: | |
name: Push new release to cloud | |
uses: ChargedBV/sessy-updates/.github/workflows/cloud.yml@main | |
needs: tag | |
secrets: inherit |