Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
florianow committed Nov 5, 2024
1 parent 29b9f8b commit 97a7afa
Show file tree
Hide file tree
Showing 9 changed files with 35,286 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
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

47 changes: 47 additions & 0 deletions .gitignore
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?

35 changes: 35 additions & 0 deletions action.yml
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'

Loading

0 comments on commit 97a7afa

Please sign in to comment.