Skip to content

Commit be27461

Browse files
committed
Update workflow
1 parent 4f4a646 commit be27461

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

.github/workflows/compile-rc.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
FILENAME_PREFIX: RTK_Surveyor_Firmware_
99
RC_PREFIX: RC-
10+
VERSION: 3.1
1011
POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }}
1112

1213
jobs:
@@ -75,8 +76,34 @@ jobs:
7576
cd esp32.esp32.esp32
7677
mv RTK_Surveyor.ino.bin ${{ env.FILENAME_PREFIX }}${{ env.RC_PREFIX }}${{ steps.date.outputs.date }}.bin
7778
78-
- name: Upload binary to action
79-
uses: actions/upload-artifact@v3
80-
with:
81-
name: ${{ env.FILENAME_PREFIX }}${{ env.RC_PREFIX }}${{ steps.date.outputs.date }}
82-
path: ./Firmware/RTK_Surveyor/build/esp32.esp32.esp32/${{ env.FILENAME_PREFIX }}${{ env.RC_PREFIX }}${{ steps.date.outputs.date }}.bin
79+
- name: Push binary to Binaries Repo
80+
uses: dmnemec/copy_file_to_another_repo_action@main
81+
env:
82+
API_TOKEN_GITHUB: ${{ secrets.API_GITHUB_RTK_FILE_TOKEN }}
83+
with:
84+
source_file: ./Blink/build/esp32.esp32.esp32/${{ env.FILENAME_PREFIX }}${{ env.RC_PREFIX }}${{ steps.date.outputs.date }}.bin
85+
destination_repo: 'sparkfun/SparkFun_RTK_Firmware_Binaries'
86+
destination_folder: ''
87+
user_email: '[email protected]'
88+
user_name: 'nseidle'
89+
commit_message: 'Github Action - Updating Binary ${{ steps.date.outputs.date }}'
90+
91+
- name: Update JSON File
92+
uses: "DamianReeves/write-file-action@master"
93+
with:
94+
path: RTK-RC-Firmware.json
95+
write-mode: overwrite
96+
contents: |
97+
{"Configurations": [{"Version":"${{ env.VERSION }}-${{ steps.date.outputs.date }}", "URL":"https://raw.githubusercontent.com/sparkfun/SparkFun_RTK_Firmware_Binaries/main/${{ env.FILENAME_PREFIX }}${{ env.RC_PREFIX }}${{ steps.date.outputs.date }}.bin"}]}
98+
99+
- name: Push JSON to Binaries Repo
100+
uses: dmnemec/copy_file_to_another_repo_action@main
101+
env:
102+
API_TOKEN_GITHUB: ${{ secrets.API_GITHUB_RTK_FILE_TOKEN }}
103+
with:
104+
source_file: RTK-RC-Firmware.json
105+
destination_repo: 'sparkfun/SparkFun_RTK_Firmware_Binaries'
106+
destination_folder: ''
107+
user_email: '[email protected]'
108+
user_name: 'nseidle'
109+
commit_message: 'Github Action - Updating JSON ${{ steps.date.outputs.date }}'

0 commit comments

Comments
 (0)