-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into refactor/term
- Loading branch information
Showing
41 changed files
with
680 additions
and
227 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,87 @@ | ||
name: publish nodejs package | ||
description: publish nodejs package | ||
inputs: | ||
token: | ||
description: The NPM access token to use when publishing | ||
required: true | ||
access: | ||
description: > | ||
Determines whether the published package should be publicly visible, | ||
or restricted to members of your NPM organization. | ||
required: false | ||
dry-run: | ||
description: Run npm with the --dry-run flag to avoid actually publishing anything. | ||
required: false | ||
on_finished: | ||
description: Run a bash on finished. | ||
required: false | ||
on_publish_failed: | ||
description: Run a bash on publish failed. | ||
required: false | ||
outputs: | ||
failed: | ||
description: "Random number" | ||
value: ${{ (steps.nodejs.outputs.id == '' || steps.publish_failed.outputs.failed == 'true') && 'true' || '' }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: JS-DevTools/npm-publish@v3 | ||
id: nodejs | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node-win32-x64 | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node-win32-arm64 | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node-linux-x64 | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node-linux-arm64 | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node-darwin-x64 | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: assets/MAA-nodejs-package/maa-node-darwin-arm64 | ||
token: ${{ inputs.token }} | ||
access: ${{ inputs.access }} | ||
dry-run: ${{ inputs.dry-run }} | ||
- name: Finished | ||
if: always() | ||
shell: bash | ||
run: | | ||
eval $ON_FINISHED || echo "::warning::Failed to eval $ON_FINISHED" | ||
env: | ||
ON_FINISHED: ${{ inputs.on_finished }} | ||
- name: Publish Failed | ||
id: publish_failed | ||
if: failure() || steps.nodejs.outputs.id == '' | ||
shell: bash | ||
run: | | ||
eval $ON_PUBLISH_FAILED || echo "::warning::Failed to eval $ON_PUBLISH_FAILED" | ||
echo "failed=true" >> $GITHUB_OUTPUT | ||
env: | ||
ON_PUBLISH_FAILED: ${{ inputs.on_publish_failed }} |
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
Oops, something went wrong.