forked from lukeed/resolve.exports
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2 changed files
with
108 additions
and
3 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,52 @@ | ||
name: Release | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
# File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions. | ||
node-version: 18 | ||
|
||
- name: Install | ||
run: | | ||
npm install | ||
- name: Pre-release | ||
run: npm run build | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm run semantic-release | ||
|
||
- name: Add lib, types and docs to Git | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
run: | | ||
git add --force dist | ||
- name: Commit files | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -m "chore(gh-bot): :rocket: release" -a | ||
- name: Push changes | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
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,7 +1,11 @@ | ||
{ | ||
"version": "0.0.0", | ||
"name": "resolve.imports", | ||
"repository": "okikio/resolve.imports", | ||
"type": "module", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/okikio/resolve.imports.git" | ||
}, | ||
"description": "A tiny (613b), correct, general-purpose, and configurable subpath \"imports\" resolver without file-system reliance (forked from @lukeed's `resolve.exports`)", | ||
"module": "dist/index.mjs", | ||
"main": "dist/index.js", | ||
|
@@ -12,12 +16,16 @@ | |
"email": "[email protected]", | ||
"url": "https://okikio.dev" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/okikio/resolve.imports/issues" | ||
}, | ||
"engines": { | ||
"node": ">=10" | ||
}, | ||
"scripts": { | ||
"build": "bundt", | ||
"test": "uvu -r esm test" | ||
"test": "uvu -r esm test", | ||
"semantic-release": "semantic-release" | ||
}, | ||
"files": [ | ||
"*.d.ts", | ||
|
@@ -43,6 +51,51 @@ | |
"devDependencies": { | ||
"bundt": "1.1.2", | ||
"esm": "3.2.25", | ||
"uvu": "0.5.1" | ||
"uvu": "0.5.1", | ||
"@commitlint/cli": "^17.1.2", | ||
"@commitlint/config-conventional": "^17.1.0", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"husky": "^8.0.1", | ||
"semantic-release": "^19.0.5" | ||
}, | ||
"release": { | ||
"branches": [ | ||
"main", | ||
"master" | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/git", | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [ | ||
"*.d.ts", | ||
"dist" | ||
] | ||
} | ||
] | ||
] | ||
}, | ||
"changelog": { | ||
"repo": "resolve.imports", | ||
"labels": { | ||
"breaking": ":boom: Breaking Change", | ||
"enhancement": ":rocket: Enhancement", | ||
"bug": ":bug: Bug Fix", | ||
"documentation": ":memo: Documentation", | ||
"internal": ":house: Internal", | ||
"revert": ":rewind: Revert" | ||
}, | ||
"cacheDir": ".changelog" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS --verbose" | ||
} | ||
} | ||
} |