forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (30 loc) · 1.18 KB
/
release-to-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Whenever a release is published from a draft, this will update the
# master Arduino JSON file to add its new entry.
# We keep the master JSON file in another repo, so we need to use a pre-set
# Deployment SSH key to be able to push a change to the repo.
#### Steps to follow when you need to make a new SSH key for upload (not
#### normally needed!)
# Generate a new SSH key private/public pair
# ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ./deploy_rsa
# Upload deploy_rsa.pub to the *ESP8266.GITHUB.IO* repo as a deployment key
# Convert the private key to base64 (to remove line breaks and allow easier
# usage in the script as an environment variable)
# base64.exe -w 0 < deploy_rsa > deploy_rsa.b64
# Copy the contents of the .b64 file to the clipboard, make a new GitHub
# secret in the ESP8266/Arduino repo called "GHCI_DEPLOY_KEY" and paste
# the B64 code into the variable.
name: ESP8266 Arduino Release Publisher
on:
release:
types: [published]
jobs:
package:
name: Update master JSON file
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Deploy updated JSON
run: |
bash ./package/deploy_package_index.sh