Aligned workflow/docs with the default branch name

This is required after switching the default from `master` to `main`.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2021-02-11 14:20:24 +01:00 committed by Akos Kitta
parent b2641f56be
commit b3deb2fd34
4 changed files with 11 additions and 35 deletions

View File

@ -3,13 +3,13 @@ name: Arduino IDE
on: on:
push: push:
branches: branches:
- master - main
tags: tags:
- '[0-9]+.[0-9]+.[0-9]+*' - '[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch: workflow_dispatch:
pull_request: pull_request:
branches: branches:
- master - main
schedule: schedule:
- cron: '0 3 * * *' # run every day at 3AM (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) - cron: '0 3 * * *' # run every day at 3AM (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
@ -48,7 +48,7 @@ jobs:
AC_PASSWORD: ${{ secrets.AC_PASSWORD }} AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
IS_NIGHTLY: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') }} IS_NIGHTLY: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }}
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }} IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
run: | run: |
# See: https://www.electron.build/code-signing # See: https://www.electron.build/code-signing
@ -112,7 +112,7 @@ jobs:
echo "$BODY" > CHANGELOG.txt echo "$BODY" > CHANGELOG.txt
- name: Upload Changelog [GitHub Actions] - name: Upload Changelog [GitHub Actions]
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: build-artifacts name: build-artifacts
@ -120,7 +120,7 @@ jobs:
publish: publish:
needs: changelog needs: changelog
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download [GitHub Actions] - name: Download [GitHub Actions]

View File

@ -1,24 +0,0 @@
image:
file: Dockerfile
ports:
- port: 3000
onOpen: open-preview
- port: 5900
onOpen: ignore
- port: 6080
onOpen: ignore
tasks:
- init: >
yarn &&
yarn --cwd ./browser-app start
github:
prebuilds:
master: true
branches: true
pullRequests: true
pullRequestsFromForks: true
addComment: false
addBadge: false

View File

@ -28,7 +28,7 @@ These are available from the [GitHub releases page](https://github.com/arduino/a
#### Nightly builds #### Nightly builds
These builds are generated every day at 03:00 GMT from the `master` branch and These builds are generated every day at 03:00 GMT from the `main` branch and
should be considered unstable. In order to get the latest nightly build should be considered unstable. In order to get the latest nightly build
available for the supported platform, use the following links: available for the supported platform, use the following links:
@ -75,8 +75,8 @@ yarn start
This project is built on [GitHub Actions](https://github.com/bcmi-labs/arduino-editor/actions?query=workflow%3A%22Arduino+Pro+IDE%22). This project is built on [GitHub Actions](https://github.com/bcmi-labs/arduino-editor/actions?query=workflow%3A%22Arduino+Pro+IDE%22).
- _Snapshot_ builds run when changes are pushed to the `master` branch, or when a PR is created against the `master` branch. For the sake of the review and verification process, the build artifacts can be downloaded from the GitHub Actions page. Note: [due to a limitation](https://github.com/actions/upload-artifact/issues/80#issuecomment-630030144) with the GH Actions UI, you cannot download a particular build, but you have to get all together inside the `build-artifacts.zip`. - _Snapshot_ builds run when changes are pushed to the `main` branch, or when a PR is created against the `main` branch. For the sake of the review and verification process, the build artifacts can be downloaded from the GitHub Actions page. Note: [due to a limitation](https://github.com/actions/upload-artifact/issues/80#issuecomment-630030144) with the GH Actions UI, you cannot download a particular build, but you have to get all together inside the `build-artifacts.zip`.
- _Nightly_ builds run every day at 03:00 GMT from the `master` branch. - _Nightly_ builds run every day at 03:00 GMT from the `main` branch.
- _Release_ builds run when a new tag is pushed to the remote. The tag must follow the [semver](https://semver.org/). For instance, `1.2.3` is a correct tag, but `v2.3.4` won't work. Steps to trigger a new release build: - _Release_ builds run when a new tag is pushed to the remote. The tag must follow the [semver](https://semver.org/). For instance, `1.2.3` is a correct tag, but `v2.3.4` won't work. Steps to trigger a new release build:
- Create a local tag: - Create a local tag:
```sh ```sh
@ -90,7 +90,7 @@ This project is built on [GitHub Actions](https://github.com/bcmi-labs/arduino-e
### Creating a GH release ### Creating a GH release
This section guides you through how to create a new release. Let's assume the current version is `0.1.3` and you want to release `0.2.0`. This section guides you through how to create a new release. Let's assume the current version is `0.1.3` and you want to release `0.2.0`.
- Make sure the `master` state represents what you want to release and you're on `master`. - Make sure the `main` state represents what you want to release and you're on `main`.
- Prepare a release-candidate build on a branch: - Prepare a release-candidate build on a branch:
```bash ```bash
git branch 0.2.0-rc \ git branch 0.2.0-rc \
@ -108,7 +108,7 @@ git add . \
&& git push && git push
``` ```
- Create the GH PR the workflow starts automatically. - Create the GH PR the workflow starts automatically.
- Once you're happy with the RC, merge the changes to the `master`. - Once you're happy with the RC, merge the changes to the `main`.
- Create a tag and push it: - Create a tag and push it:
```bash ```bash
git tag -a 0.2.0 -m "0.2.0" \ git tag -a 0.2.0 -m "0.2.0" \

View File

@ -97,7 +97,7 @@ function currentCommitish() {
function generateTemplate(buildDate) { function generateTemplate(buildDate) {
// do `export PUBLISH=true yarn package` if you want to mimic CI build locally. // do `export PUBLISH=true yarn package` if you want to mimic CI build locally.
// const electronPublish = release || (isCI && currentBranch() === 'master') || process.env.PUBLISH === 'true'; // const electronPublish = release || (isCI && currentBranch() === 'main') || process.env.PUBLISH === 'true';
const version = getVersion(); const version = getVersion();
const productName = 'Arduino IDE'; const productName = 'Arduino IDE';
const name = 'arduino-ide'; const name = 'arduino-ide';