-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d76403
commit a9e9ccf
Showing
4 changed files
with
36 additions
and
4 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 |
---|---|---|
|
@@ -4,22 +4,40 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version' | ||
description: "Release version" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write # The OIDC ID token is used for authentication with JSR. | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- uses: denoland/setup-deno@main | ||
- name: Setup Deno | ||
uses: denoland/setup-deno@main | ||
with: | ||
deno-version: v1.x | ||
|
||
- run: deno task npm ${{ inputs.version }} | ||
- name: Bump project verison | ||
run: deno task version ${{ inputs.version }} | ||
|
||
- name: Publish to JSR | ||
run: deno publish | ||
|
||
- name: Commit changes | ||
uses: EndBug/[email protected] | ||
with: | ||
author_name: github-actions[bot] | ||
author_email: 41898282+github-actions[bot]@users.noreply.github.com | ||
message: "bump version" | ||
|
||
- name: Build npm package | ||
run: deno task npm ${{ inputs.version }} | ||
|
||
- name: Publish to npm | ||
run: | | ||
|
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
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,9 @@ | ||
if (Deno.args[0] === undefined) { | ||
throw Error("missing version arg!"); | ||
} | ||
|
||
const data = JSON.parse(Deno.readTextFileSync("./deno.json")); | ||
data.version = Deno.args[0]; | ||
Deno.writeTextFileSync("./deno.json", JSON.stringify(data, null, 2)); | ||
|
||
console.log(`version set to ${Deno.args[0]}`); |