-
Notifications
You must be signed in to change notification settings - Fork 13.3k
49 lines (37 loc) · 1.4 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
42
43
44
45
46
47
48
49
# 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]
permissions:
contents: read
jobs:
package:
name: Update master JSON file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 0
- name: Deploy updated JSON
env:
BUILD_TYPE: package
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
GHCI_DEPLOY_KEY: ${{ secrets.GHCI_DEPLOY_KEY }}
run: |
bash ./package/deploy_package_index.sh