Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @tjcouch-sil @lyonsil
* @tjcouch-sil @lyonsil @irahopkinson
1 change: 1 addition & 0 deletions .github/actions/bump-versions-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ runs:
# Bump versions using the built-in git token https://github.com/actions/checkout/tree/v4/?tab=readme-ov-file#push-a-commit-using-the-built-in-token
shell: bash
run: |
cd ${GITHUB_ACTION_PATH}/../../..
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
npm run bump-versions -- ${{ inputs.newVersion }}
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:

- name: Bump repo versions
if: ${{ inputs.newVersionAfterPublishing != '' }}
uses: ./.github/actions/bump-versions-action
uses: ./extension-repo/.github/actions/bump-versions-action
with:
newVersion: ${{ inputs.newVersionAfterPublishing }}

Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,9 @@ To package these extensions into a zip file for distribution:

These steps will walk you through releasing a version on GitHub and bumping the version to a new version so future changes apply to the new in-progress version. These release workflows and scripts expect that all extensions in this repo are on the same version.

1. Make sure the versions in this repo are on the version number you want to release. If they are not, run the `bump-versions` npm script to set the versions to what you want to release. This script will create a branch named `bump-versions-<version>` from your current head with the needed changes. Open a PR and merge that new branch into the branch you plan to release from. For example, to bump branch `my-branch` to version 0.2.0, run the following:
1. Make sure the versions in this repo are on the version number you want to release. If they are not, manually dispatch the [Bump Versions workflow](#bumping-version-without-publishing-a-release) or run the `bump-versions` npm script to set the versions to what you want to release on the branch you want to release from.

```bash
git checkout my-branch
npm run bump-versions 0.2.0
```

Then create a PR and merge the `bump-versions-0.2.0` branch into `my-branch`. `my-branch` is now ready for release.

2. Manually dispatch the Publish workflow in GitHub Actions targeting the branch you want to release from (in the previous example, this would be `my-branch`). This workflow creates a new pre-release for the version you intend to release and creates a new `bump-versions-<next_version>` branch to bump the version after the release so future changes apply to a new in-progress version instead of to the already released version. This workflow has the following inputs:
2. Manually dispatch the Publish workflow in GitHub Actions targeting the branch you want to release from. This workflow creates a new pre-release for the version you intend to release and creates a new `bump-versions-<next_version>` branch to bump the version after the release so future changes apply to a new in-progress version instead of to the already released version. This workflow has the following inputs:

- `version`: Enter the version you intend to publish (e.g. 0.2.0). This is simply for verification to make sure you release the code that you intend to release. It is compared to the version in the code, and the workflow will fail if they do not match.
- `newVersionAfterPublishing`: Enter the version you want to bump to after releasing (e.g. 0.3.0-alpha.0). Future changes will apply to this new version instead of to the version that was already released. Leave blank if you don't want to bump.
Expand Down Expand Up @@ -195,6 +188,25 @@ These steps will walk you through releasing a version on GitHub and bumping the
3. In GitHub, adjust the new draft release's body and other metadata as desired, then publish the release.
4. Open a PR and merge the newly created `bump-versions-<next_version>` branch.

### Bumping version without publishing a release

Sometimes, it may be useful to change the version without [publishing a release](#publishing).

To bump versions without publishing a release, manually dispatch the Bump Versions workflow in GitHub Actions targeting the branch on which you want to change versions. Alternatively, you can run the `bump-versions` npm script. This workflow will create a branch named `bump-versions-<version>` from the target branch (or, if running the script, your current head) with the needed changes. Open a PR and merge that new branch into the branch on which you want to change versions.

This workflow has the following inputs:

- `newVersion`: enter the version you want to bump to (e.g. 0.3.0-alpha.0). Future changes will apply to this new version instead of to the version.

For example, to bump branch `my-branch` to version `0.2.0`, run the following:

```bash
git checkout my-branch
npm run bump-versions -- 0.2.0
```

Then create a PR and merge the `bump-versions-0.2.0` branch into `my-branch`. `my-branch` is now ready for release.

### Publishing problems

Following are some problems you may encounter while publishing and steps to solve them.
Expand All @@ -208,7 +220,7 @@ Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: Failed to load native binding
```

You may have a different effective version of `@swc/core` than `paranext-core` does. Please make sure the version of `@swc/core` in your `package-lock.json` is the same as its version in [`paranext-core/package-lock.json`](https://github.com/paranext/paranext-core/blob/main/package-lock.json). If they are not the same, please fix them to be the same by running `npm i -D @swc/core@<version>` where the version is the version of `@swc/core` installed in `paranext-core/package-lock.json` (if you would like to set the version of `@swc/core` back to what it was before in `package.json` to stay synced with the extension template, change it back manually in `package.json` and then run `npm i`). If they are already the same, you may need to try regenerating your `package-lock.json` file by deleting it and running `npm i`.
Please see ["Failed to load native binding" in the Troubleshooting guide for how to solve this problem](https://github.com/paranext/paranext/wiki/Troubleshooting-Guide#failed-to-load-native-binding).

## To create a new extension in this repo

Expand Down
Loading
Loading