-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump version to 1.6.0 * update changelog * Update CI to match other libraries
- Loading branch information
Showing
8 changed files
with
147 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Create bump version PR | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to change to. | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
bump-version-pr: | ||
name: Bump version PR | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Use Node.js from nvmrc | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Bump version | ||
run: | | ||
npm version --commit-hooks false --git-tag-version false ${{ inputs.version }} | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: Bump version to ${{ inputs.version }} | ||
branch: bump-version-to-${{ inputs.version }} | ||
title: Bump version to ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,98 @@ | ||
name: publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
release-check: | ||
name: Check if version changed | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Use Node.js from nvmrc | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Check if version has been updated | ||
id: check | ||
uses: EndBug/version-check@v2 | ||
|
||
outputs: | ||
publish: ${{ steps.check.outputs.changed }} | ||
|
||
release: | ||
name: Release | ||
needs: release-check | ||
if: ${{ needs.release-check.outputs.publish == 'true' }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Use Node.js x64 | ||
uses: actions/setup-node@v2 | ||
- name: Use Node.js from nvmrc | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
architecture: x64 | ||
registry-url: "https://registry.npmjs.org" | ||
node-version-file: '.nvmrc' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install build dependencies | ||
- name: Get version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: Install & build | ||
run: | | ||
npm ci | ||
npm run build-dist | ||
- name: Publish | ||
- name: Publish NPM package | ||
run: | | ||
npm publish --access=public --non-interactive | ||
npm publish --access=public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} | ||
|
||
- name: Tag commit and push | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ steps.package-version.outputs.current-version }} | ||
|
||
- name: Create GitHub Release | ||
id: create_regular_release | ||
uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: ${{ steps.tag_version.outputs.new_tag }} | ||
body: 'Changes since last release:\n ${{ steps.tag_version.outputs.changelog }}' | ||
allowUpdates: true | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Build the Docs | ||
run: | | ||
npm run docs | ||
- name: Publish the docs | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs | ||
commit_message: 'deploy docs: ${{ steps.tag_version.outputs.new_tag }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters