store artifacts #8
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: ESPHome Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create empty secrets file | |
run: | | |
touch firmware/secrets.yaml | |
touch firmware/conf.d/secrets.yaml | |
- name: Build ESPHome firmware | |
uses: esphome/[email protected] | |
with: | |
yaml-file: firmware/config.yaml | |
release-summary: "Test" | |
complete-manifest: true | |
- name: List output files | |
run: | | |
ls -l | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: openspool-esp32s2-${{ github.sha }} | |
path: | | |
openspool-esp32s2/*.bin | |
openspool-esp32s2/manifest.json | |
retention-days: 90 | |
- name: Store Latest Commit Indefinitely | |
uses: actions/upload-artifact@v2 | |
with: | |
name: openspool-esp32s2-latest | |
path: | | |
openspool-esp32s2/*.bin | |
openspool-esp32s2/manifest.json | |
cleanup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete old artifacts | |
uses: c-hive/gha-remove-artifacts@v1 | |
with: | |
age: '90 days' | |
skip-recent: 5 |