Skip to content

Commit a11f866

Browse files
committed
Merge branch 'master' into additional_include_paths_libs
2 parents b80c5c2 + bf3124f commit a11f866

File tree

340 files changed

+8939
-7575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+8939
-7575
lines changed

.github/workflows/docs.yaml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: docs
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- closed
9+
paths:
10+
# existing docs
11+
- 'docs/**'
12+
# changes to the cli reference generator
13+
- 'docsgen/**'
14+
# potential changes to commands documentation
15+
- 'cli/**'
16+
# potential changes to gRPC documentation
17+
- 'rpc/**'
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
27+
- name: Install Taskfile
28+
uses: Arduino/actions/setup-taskfile@master
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Setup Go
33+
uses: actions/setup-go@v2-beta
34+
with:
35+
go-version: '1.13'
36+
37+
- name: Install Go dependencies
38+
run: |
39+
go version
40+
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
41+
42+
- name: Install protoc compiler
43+
uses: arduino/[email protected]
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Setup Python
48+
uses: actions/setup-python@v1
49+
with:
50+
python-version: '3.6'
51+
architecture: 'x64'
52+
53+
- name: Cache dependencies
54+
uses: actions/cache@v1
55+
with:
56+
path: ~/.cache/pip
57+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
58+
restore-keys: |
59+
${{ runner.os }}-pip-
60+
61+
- name: Install Python dependencies
62+
run: |
63+
python3 -m pip install --upgrade pip
64+
python3 -m pip install -r ./requirements_docs.txt
65+
66+
- name: Build docs website
67+
run: task docs:build
68+
69+
- name: Deploy
70+
# publish docs only when PR is merged
71+
if: github.event.pull_request.merged == true
72+
uses: peaceiris/actions-gh-pages@v3
73+
with:
74+
github_token: ${{ secrets.GITHUB_TOKEN }}
75+
publish_dir: ./public

.github/workflows/nightly.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
PLUGIN_SOURCE: 'dist/*'
3131
PLUGIN_TARGET: '/arduino-cli/nightly'
3232
PLUGIN_STRIP_PREFIX: 'dist/'
33-
PLUGIN_BUCKET: 'arduino-downloads-prod-beagle'
33+
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
3434
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3535
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/release.yaml

+115-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- '[0-9].[0-9].[0-9]*'
77

88
jobs:
9-
publish-release:
9+
10+
create-release-artifacts:
1011
runs-on: ubuntu-latest
1112

1213
container:
@@ -16,13 +17,121 @@ jobs:
1617
- $PWD/go:/go
1718

1819
steps:
19-
- name: checkout
20+
- name: Checkout
2021
uses: actions/checkout@v1
2122

22-
- name: build
23+
- name: Build
24+
run: goreleaser
25+
26+
- name: Upload artifacts
27+
uses: actions/upload-artifact@v1
28+
with:
29+
name: dist
30+
path: dist
31+
32+
notarize-macos:
33+
runs-on: macos-latest
34+
needs: create-release-artifacts
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v1
39+
40+
- name: Download artifacts
41+
uses: actions/download-artifact@v1
42+
with:
43+
name: dist
44+
45+
- name: Get the current release tag
46+
id: get_tag
47+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
48+
49+
- name: Download Gon
50+
run: |
51+
wget -q https://github.com/mitchellh/gon/releases/download/v0.2.2/gon_0.2.2_macos.zip
52+
unzip gon_0.2.2_macos.zip -d /usr/local/bin
53+
rm -f gon_0.2.2_macos.zip
54+
55+
- name: Notarize binary, re-package it and update checksum
2356
env:
24-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
57+
TAG: ${{ steps.get_tag.outputs.VERSION }}
58+
AC_USERNAME: ${{ secrets.AC_USERNAME }}
59+
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
60+
# This step performs the following:
61+
# 1. Download keychain from GH secrets and decode it from base64
62+
# 2. Add the keychain to the system keychains and unlock it
63+
# 3. Call Gon to start notarization process (using AC_USERNAME and AC_PASSWORD)
64+
# 4. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
65+
# 5. Recalculate package checksum and replace it in the goreleaser nnnnnn-checksums.txt file
66+
run: |
67+
echo "${{ secrets.KEYCHAIN }}" | base64 --decode > ~/Library/Keychains/apple-developer.keychain-db
68+
security list-keychains -s ~/Library/Keychains/apple-developer.keychain-db
69+
security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" ~/Library/Keychains/apple-developer.keychain-db
70+
gon gon.config.hcl
71+
# GitHub's upload/download-artifact@v1 actions don't preserve file permissions,
72+
# so we need to add execution permission back until @v2 actions are released.
73+
chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
74+
tar -czvf dist/arduino-cli_${TAG}_macOS_64bit.tar.gz \
75+
-C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \
76+
-C ../../ LICENSE.txt
77+
CLI_CHECKSUM=$(shasum -a 256 dist/arduino-cli_${TAG}_macOS_64bit.tar.gz | cut -d " " -f 1)
78+
perl -pi -w -e "s/.*arduino-cli_${TAG}_macOS_64bit.tar.gz/${CLI_CHECKSUM} arduino-cli_${TAG}_macOS_64bit.tar.gz/g;" dist/*-checksums.txt
79+
80+
- name: Upload artifacts
81+
uses: actions/upload-artifact@v1
82+
with:
83+
name: dist
84+
path: dist
85+
86+
create-release:
87+
runs-on: ubuntu-latest
88+
needs: notarize-macos
89+
90+
steps:
91+
- name: Checkout
92+
uses: actions/checkout@v1
93+
94+
- name: Download artifact
95+
uses: actions/download-artifact@v1
96+
with:
97+
name: dist
98+
99+
- name: Read CHANGELOG
100+
id: changelog
101+
run: |
102+
body=$(cat dist/CHANGELOG.md)
103+
body="${body//'%'/'%25'}"
104+
body="${body//$'\n'/'%0A'}"
105+
body="${body//$'\r'/'%0D'}"
106+
echo $body
107+
echo "::set-output name=BODY::$body"
108+
109+
- name: Create Github Release
110+
id: create_release
111+
uses: actions/create-release@master
112+
env:
113+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
with:
115+
tag_name: ${{ github.ref }}
116+
release_name: ${{ github.ref }}
117+
body: ${{ steps.changelog.outputs.BODY }}
118+
draft: false
119+
prerelease: false
120+
121+
- name: Upload release files on Github
122+
uses: svenstaro/upload-release-action@v1-release
123+
with:
124+
repo_token: ${{ secrets.GITHUB_TOKEN }}
125+
file: dist/*
126+
tag: ${{ github.ref }}
127+
file_glob: true
128+
129+
- name: Upload release files on Arduino downloads servers
130+
uses: docker://plugins/s3
131+
env:
132+
PLUGIN_SOURCE: 'dist/*'
133+
PLUGIN_TARGET: '/arduino-cli/'
134+
PLUGIN_STRIP_PREFIX: 'dist/'
135+
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
25136
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
26137
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
27-
AWS_DEFAULT_REGION: 'us-east-1'
28-
run: goreleaser

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Install Python
6868
uses: actions/setup-python@v1
6969
with:
70-
python-version: '3.7'
70+
python-version: '3.8'
7171
architecture: 'x64'
7272

7373
- name: Run integration tests

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ venv
2020

2121
# Misc.
2222
.DS_Store
23+
24+
# Mkdocs
25+
/public/
26+
/docsgen/arduino-cli
27+
/docs/rpc/*.md
28+
/docs/commands/*.md

.goreleaser.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ snapshot:
66
name_template: '{{ .Env.PACKAGE_NAME_PREFIX }}-{{ time "20060102" }}'
77

88
release:
9-
prerelease: auto
9+
disable: true
1010

1111
changelog:
1212
filters:
@@ -111,13 +111,4 @@ archives:
111111
linux: Linux
112112
windows: Windows
113113
files:
114-
- README.md
115114
- LICENSE.txt
116-
117-
blob:
118-
-
119-
provider: s3
120-
bucket: arduino-downloads-prod-beagle
121-
ids:
122-
- arduino_cli
123-
folder: "{{ .ProjectName }}"

0 commit comments

Comments
 (0)