Skip to content

Commit

Permalink
Configure publishing to GH
Browse files Browse the repository at this point in the history
- Add GH release config used to generate release notes
- also add `.nvmrc` to specify default node version on macos and linux
  • Loading branch information
irahopkinson committed Jan 23, 2023
1 parent 112fb2a commit 3325563
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- octocat
- dependabot
categories:
- title: Breaking Changes 🛠
labels:
- Semver-Major
- breaking-change
- title: Exciting New Features 🎉
labels:
- Semver-Minor
- enhancement
- title: Other Changes
labels:
- '*'
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ name: Publish

on:
push:
branches:
- main
branches: [release/*]

jobs:
publish:
# To enable auto publishing to github, update your electron publisher
# config in package.json > "build" and remove the conditional below
if: ${{ github.repository_owner == 'electron-react-boilerplate' }}
name: Build on node ${{ matrix.node_version }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
node_version: [16.x]
os: [macos-latest]

steps:
Expand All @@ -24,7 +22,7 @@ jobs:
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: 16
node-version: ${{ matrix.node_version }}
cache: npm

- name: Install and build
Expand All @@ -34,6 +32,8 @@ jobs:
npm run build
- name: Publish releases
# If the commit is tagged with a version (e.g. "v1.2.3"),
if: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.') }}
env:
# These values are used for auto updates signing
APPLE_ID: ${{ secrets.APPLE_ID }}
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.15.0
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ To package apps for the local platform:
npm run package
```

## Publishing

1. Create a branch of the form `release/*`, e.g. `release/v1.2.3`, or `release/v1.2.3-rc1`.
2. Update the _version_ in your project's `package.json` file (e.g. _1.2.3_).
3. Run `npm i` to update `package-lock.json`.
4. Create a new draft GitHub **Release**, ensure the following are included:
- a _Tag version_, e.g. `v1.2.3`.
- a copy of the change log. Click **Generate release notes** as a starting point.
5. Update `CHANGELOG.md` with changes in this release from the GitHub draft **Release**.
6. Commit these changes to your release branch.
7. Tag your commit, e.g. `v1.2.3`.
8. Push the tag then the commit to GitHub.
9. Once the GitHub build **Action** has finished, it will add build artifact files to the draft release. Remove the `.blockmap` and `.yml` files and leave the executable, e.g. `.exe` on Windows.
10. Publish the release on GitHub.

## Linux Development

Add the system libraries needed for Electron, [Build Instructions (Linux)](https://www.electronjs.org/docs/latest/development/build-instructions-linux).
Expand Down

0 comments on commit 3325563

Please sign in to comment.