Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolie Rabideau authored and Jolie Rabideau committed Sep 29, 2023
2 parents b6a02d0 + 2270dd5 commit 73e3bf9
Show file tree
Hide file tree
Showing 48 changed files with 1,200 additions and 1,755 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/package-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Package

on:
push:
branches: [main]
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

jobs:
publish:
name: Main on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }}, node ${{ matrix.node_version }}

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

strategy:
matrix:
os: [macos-latest, ubuntu-latest]
dotnet_version: [7.0.x]
node_version: [18.x]

steps:
- name: Checkout git repo
uses: actions/checkout@v3

- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{matrix.dotnet_version}}

- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: npm

- name: Install and build
run: |
npm install
npm run build
- name: Update release version
run: |
COMMIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
cd ./release/app
CURRENT_VERSION=$(node -pe "require('./package.json').version")
NEW_VERSION="${CURRENT_VERSION}-commit.${COMMIT_HASH}"
echo "Updating version from ${CURRENT_VERSION} to ${NEW_VERSION}"
npm version $NEW_VERSION
- name: dotnet build - Windows on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: npm run build:data-release:windows

- name: Publish releases - Windows and macOS
if: ${{ matrix.os == 'macos-latest' }}
# env:
# # These values are used for auto updates signing
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
run: |
npm exec electron-builder -- build --publish never --win --mac
- name: Publish releases - Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
# no hardlinks so dependencies are copied
USE_HARD_LINKS: false
run: |
npm exec electron-builder -- build --publish never --linux
- name: Upload macOS artifacts
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v3
with:
name: app-macos
path: |
./release/build/*.dmg
- name: Upload Windows artifacts
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v3
with:
name: app-windows
path: |
./release/build/*.exe
!./release/build/*Setup*.exe
- name: Upload Linux artifacts
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v3
with:
name: app-linux
path: |
./release/build/*.AppImage
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
18 changes: 4 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
publish:
name: Publish on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }}, and node ${{ matrix.node_version }}
name: Release on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }}, node ${{ matrix.node_version }}

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

Expand Down Expand Up @@ -43,21 +43,11 @@ jobs:
npm install
npm run build
- name: Install DMG license
- name: dotnet build - Windows on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: npm install dmg-license
run: npm run build:data-release:windows

- name: dotnet build - MacOS and Windows
if: ${{ matrix.os == 'macos-latest' }}
run: |
npm run build:data-release:windows
npm run build:data-release:macos
- name: dotnet build - Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: npm run build:data-release:linux

- name: Publish releases - Windows and MacOS
- name: Publish releases - Windows and macOS
# If the branch is labeled as a release version (e.g. "release/v1.2.3"),
if: ${{ matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/heads/release/v') && contains(github.ref, '.') }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
test:
name: Test on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }}, and node ${{ matrix.node_version }}
name: Build on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }}, node ${{ matrix.node_version }}

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

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 0.1.0 (2023.9.29)

# 0.0.2 (2023.2.28)

## What's Changed
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,21 @@ 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 `release/app/package.json` file (e.g. _1.2.3_).
3. Run `npm i` in that folder to update its `package-lock.json`.
4. Create a new draft [GitHub **Release**](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository), ensure the following are included:
2. Update the _version_ in your project's `release/app/package.json`, e.g.:
```bash
cd ./release/app
npm version 1.2.3
```
3. Create a new draft [GitHub **Release**](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository), ensure the following are included:
- a _Tag version_, e.g. `v1.2.3`, choose _Create new tag on publish_.
- set the **Target** to the release branch.
- a copy of the change log. Click **Generate release notes** as a starting point.
- Click **Save draft**.
5. Update `CHANGELOG.md` with changes in this release from the GitHub draft **Release**.
6. Commit these changes to your release branch and push the commit to GitHub.
7. Once the GitHub build **Action** has finished, it will add build artifact files to the draft release. Remove the `.blockmap` files and leave the `.yml` files and the installers and executable, e.g. `.exe` on Windows.
8. Publish the release on GitHub.
9. Merge the release branch back into **main** with a merge commit.
4. Update `CHANGELOG.md` with changes in this release from the GitHub draft **Release**.
5. Commit these changes to your release branch and push the commit to GitHub.
6. Once the GitHub build **Action** has finished, it will add build artifact files to the draft release. Remove the `.blockmap` files and leave the `.yml` files and the installers and executable, e.g. `.exe` on Windows.
7. Publish the release on GitHub.
8. Merge the release branch back into **main** with a merge commit.

## Testing

Expand Down
Binary file removed assets-excluded/logo/pt-react-256.icns
Binary file not shown.
Binary file removed assets-excluded/logo/pt-react-256.ico
Binary file not shown.
Binary file removed assets-excluded/logo/pt-react-256.png
Binary file not shown.
Loading

0 comments on commit 73e3bf9

Please sign in to comment.