-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
562cdbf
commit f95d453
Showing
5 changed files
with
105 additions
and
2 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,55 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
required: true | ||
type: string | ||
tag: | ||
required: true | ||
type: string | ||
version-args: | ||
required: true | ||
type: string | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "path=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.path }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Run install | ||
run: yarn install --frozen-lockfile | ||
|
||
# Ref: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token | ||
- name: Set up github actions user | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: Run npm version | ||
run: npm version ${{ inputs.version-args }} | ||
|
||
- name: Git push | ||
run: | | ||
git push origin ${{ inputs.branch }} | ||
git push --tags | ||
- name: Release to NPM | ||
uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
tag: ${{ inputs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
on: | ||
push: | ||
branches: alpha | ||
|
||
jobs: | ||
release: | ||
uses: reearth/core/.github/workflows/npm_release.yml@main | ||
with: | ||
branch: alpha | ||
tag: alpha | ||
version-args: --preid alpha prerelease | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,13 @@ | ||
on: | ||
push: | ||
branches: beta | ||
|
||
jobs: | ||
release: | ||
uses: reearth/core/.github/workflows/npm_release.yml@main | ||
with: | ||
branch: beta | ||
tag: beta | ||
version-args: --preid beta prerelease | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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 @@ | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version-type: | ||
required: true | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
|
||
jobs: | ||
release: | ||
uses: reearth/core/.github/workflows/npm_release.yml@main | ||
with: | ||
branch: main | ||
tag: latest | ||
version-args: ${{ inputs.version-type }} | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,6 +1,6 @@ | ||
{ | ||
"name": "@reearth/core", | ||
"version": "0.0.4", | ||
"version": "0.0.5-beta.0", | ||
"author": "Re:Earth contributors <[email protected]>", | ||
"license": "Apache-2.0", | ||
"description": "A library that abstracts a map engine as one common API.", | ||
|
@@ -19,7 +19,9 @@ | |
"preview": "vite preview", | ||
"test": "vitest", | ||
"storybook": "storybook dev -p 6007", | ||
"build-storybook": "storybook build" | ||
"build-storybook": "storybook build", | ||
"preversion": "yarn test run", | ||
"version": "yarn build" | ||
}, | ||
"engines": { | ||
"node": ">=20" | ||
|