Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release): document manual release procedure #2129

Closed
wants to merge 11 commits into from
1 change: 1 addition & 0 deletions docs/internal/Ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sudo apt update \
libx11-dev \
libxkbfile-dev \
build-essential \
libsecret-1-dev \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
&& source ~/.bashrc \
&& nvm install 16 \
Expand Down
70 changes: 70 additions & 0 deletions docs/internal/release-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,73 @@ git push origin version-<YOUR_VERSION>
```

replacing `<YOUR_VERSION>` with the version you want. Then create a PR and merge it.

## Manual build

Creating the release for Ubuntu 18.04 ([arduino/arduino-ide#2018](https://github.com/arduino/arduino-ide/issues/2018)) is a manual procedure:

- Prerequisites:
- Ask the DevOps team for an EC2 instance with at least 8 GB of RAM.
- Your account must have access to the staging AWS environment.
- You have VPN connection to staging.
- Setup:

- To install all required dependencies, run the following script:
```sh
sudo apt update \
&& sudo apt install --no-install-recommends --yes \
git \
gcc \
curl \
make \
python \
pkg-config \
libx11-dev \
libxkbfile-dev \
build-essential \
libsecret-1-dev \
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
&& source ~/.bashrc \
&& nvm install 16 \
&& nvm use 16 \
&& nvm alias default 16 \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
&& sudo apt update && sudo apt install --no-install-recommends yarn
```

- Clone:

```sh
BRANCH="<TODO: release branch name>"
git clone --single-branch --branch $BRANCH https://github.com/arduino/arduino-ide.git
```

- Build:

```sh
export IS_RELEASE=true \
&& export CI=true \
&& ./scripts/package.sh
```

- Artifacts:
- You have to upload the following artifacts from `./arduino-ide/electron-app/dist` to S3:
- `arduino-ide_${VERSION}_Linux_64bit.AppImage`,
- `arduino-ide_${VERSION}_Linux_64bit.zip`, and
- `stable-linux.yml`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add instructions to also replace the GitHub release assets with the artifacts.

### FAQ

- Q: I see no `stable` channel files, only `latest`.
- A: You forgot to set the `CI=true` environment variable.

---

- Q: How to connect to the EC2 instance?
- A: DevOps will give you a temporary link to the private key. Create a file `username_ip.pem` in your cwd, copy the private key into the file, open a shell, and execute `ssh -i "username_ip.pem" username@ip`. DevOps will tell you the `username` and the `ip`. Do not forget the VPN.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chmod 0400 username_ip.pem is missing from the steps. Otherwise there is an error:

Load key "username_ip.pem": bad permissions
username@ip: Permission denied (publickey).


---

- Q: How to download the files from the EC2 instance?
- A: `scp -i username_ip.pem username@ip:/path/to/build/artifact /local/dir`.
2 changes: 2 additions & 0 deletions scripts/update-version.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//@ts-check

// Usage `node ./scripts/update-version.js 2.1.3`

const fs = require('fs');
const path = require('path');
const semver = require('semver');
Expand Down