5
5
- main
6
6
7
7
env :
8
- FILENAME_PREFIX : RTK_Surveyor_Firmware_v3_0
8
+ FILENAME_PREFIX : RTK_Surveyor_Firmware_
9
+ VERSION : 3.1
9
10
POINTPERFECT_TOKEN : ${{ secrets.POINTPERFECT_TOKEN }}
10
11
11
12
jobs :
@@ -72,10 +73,36 @@ jobs:
72
73
cd Firmware/RTK_Surveyor
73
74
cd build
74
75
cd esp32.esp32.esp32
75
- mv RTK_Surveyor.ino.bin ${{ env.FILENAME_PREFIX }}.bin
76
+ mv RTK_Surveyor.ino.bin ${{ env.FILENAME_PREFIX }}${{ env.VERSION }} .bin
76
77
77
- - name : Upload binary to action
78
- uses : actions/upload-artifact@v3
79
- with :
80
- name : ${{ env.FILENAME_PREFIX }}
81
- path : ./Firmware/RTK_Surveyor/build/esp32.esp32.esp32/${{ env.FILENAME_PREFIX }}.bin
78
+ - name : Push binary to Binaries Repo
79
+ uses : dmnemec/copy_file_to_another_repo_action@main
80
+ env :
81
+ API_TOKEN_GITHUB : ${{ secrets.API_GITHUB_RTK_FILE_TOKEN }}
82
+ with :
83
+ source_file : ./Firmware/RTK_Surveyor/build/esp32.esp32.esp32/${{ env.FILENAME_PREFIX }}${{ env.VERSION }}.bin
84
+ destination_repo : ' sparkfun/SparkFun_RTK_Firmware_Binaries'
85
+ destination_folder : ' '
86
+
87
+ user_name : ' nseidle'
88
+ commit_message : ' Github Action - Updating Binary ${{ steps.date.outputs.date }}'
89
+
90
+ - name : Update JSON File
91
+ uses : " DamianReeves/write-file-action@master"
92
+ with :
93
+ path : RTK-Firmware.json
94
+ write-mode : overwrite
95
+ contents : |
96
+ {"Configurations": [{"Version":"${{ env.VERSION }}", "URL":"https://raw.githubusercontent.com/sparkfun/SparkFun_RTK_Firmware_Binaries/main/${{ env.FILENAME_PREFIX }}${{ env.VERSION }}.bin"}]}
97
+
98
+ - name : Push JSON to Binaries Repo
99
+ uses : dmnemec/copy_file_to_another_repo_action@main
100
+ env :
101
+ API_TOKEN_GITHUB : ${{ secrets.API_GITHUB_RTK_FILE_TOKEN }}
102
+ with :
103
+ source_file : RTK-Firmware.json
104
+ destination_repo : ' sparkfun/SparkFun_RTK_Firmware_Binaries'
105
+ destination_folder : ' '
106
+
107
+ user_name : ' nseidle'
108
+ commit_message : ' Github Action - Updating JSON ${{ steps.date.outputs.date }}'
0 commit comments