Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test environment #23

Closed
wants to merge 15 commits into from
32 changes: 32 additions & 0 deletions .github/workflows/first-file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: first try file

on:
push:
branches:
- test-environment

jobs:
publish:
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/integration/src

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install TypeScript
run: npm install -g typescript

- name: Compile TypeScript file
run: tsc try.ts

- name: Run compiled JavaScript
run: node try.js
43 changes: 43 additions & 0 deletions .github/workflows/publish-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pipeline on PR Merge

on:
pull_request:
types:
- closed
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Configure npm for lerna
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Set up Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

# Uncomment the following steps if needed
# - name: Install dependencies
# run: npm ci

# - name: Run tests
# run: npm test

- name: Publish packages
run: npx lerna publish from-package --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions tools/integration/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/integration/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@instana/stanctl-integration",
"name": "@disha-148/stanctl-integration",
"version": "1.2.0",
"description": "The Instana CLI for integration package management",
"main": "./dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions tools/integration/src/try.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("First step successful!")