-
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
9 changed files
with
35,286 additions
and
0 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,51 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Compile TypeScript | ||
run: npx tsc | ||
|
||
- name: Bundle with ncc | ||
run: npx ncc build lib/index.js -o dist | ||
|
||
- name: Get release ID | ||
id: get_release | ||
uses: actions/github-script@v4 | ||
with: | ||
script: | | ||
const release = await github.repos.getReleaseByTag({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag: context.ref.replace('refs/tags/', '') | ||
}); | ||
return release.data.id; | ||
result-encoding: string | ||
|
||
- name: Upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.get_release.outputs.result }}/assets?name=index.js | ||
asset_path: ./dist/index.js | ||
asset_name: index.js | ||
asset_content_type: application/javascript | ||
|
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,47 @@ | ||
# Node.js | ||
node_modules/ | ||
build/ | ||
|
||
# TypeScript | ||
*.tsbuildinfo | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Dependency directories | ||
jspm_packages/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# MacOS files | ||
.DS_Store | ||
|
||
# Editor directories and files | ||
.vscode/ | ||
.idea/ | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
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,35 @@ | ||
name: 'Send Status' | ||
description: 'Sends the status of a step to the meshcloud API' | ||
inputs: | ||
base_url: | ||
description: 'The base URL for the API' | ||
required: true | ||
bb_run_uuid: | ||
description: 'The Building Block Run UUID' | ||
required: true | ||
step_id: | ||
description: 'The ID of the step' | ||
required: true | ||
status: | ||
description: 'The status of the step (SUCCEEDED or FAILED)' | ||
required: true | ||
user_message: | ||
description: 'The user message for a failed step' | ||
required: false | ||
system_message: | ||
description: 'The system message for a failed step' | ||
required: false | ||
token: | ||
description: 'The API token for authentication' | ||
required: true | ||
is_final: | ||
description: 'Indicates if this is the final status report' | ||
required: false | ||
default: 'false' | ||
summary: | ||
description: 'The summary message for the final status report' | ||
required: false | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
|
Oops, something went wrong.