Skip to content

chore(deps): bump @opentelemetry/instrumentation-aws-sdk (#456) #273

chore(deps): bump @opentelemetry/instrumentation-aws-sdk (#456)

chore(deps): bump @opentelemetry/instrumentation-aws-sdk (#456) #273

Workflow file for this run

name: Release
on:
push:
branches:
- main
paths:
- "libs/**"
- package.json
- package-lock.json
- ".github/workflows/**"
workflow_dispatch:
jobs:
tagging:
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'main') }}
name: GitHub Tagging
steps:
- name: Git Checkout
uses: actions/checkout@v6
- name: Set application version
run: |
echo "PACKAGE=v$(echo `cat package.json | jq -r .version`)" >> $GITHUB_ENV
- name: Create Tag
uses: actions/github-script@v8
if: ${{ env.PACKAGE }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let tagExists = [];
try {
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ env.PACKAGE }}",
sha: context.sha
});
} catch (e) {
console.log("Tag already exists: " + e)
tagExists.push(e);
}
if (tagExists.length > 0) {
await github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/${{ env.PACKAGE }}",
sha: context.sha
});
}
release:
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'main') }}
name: GitHub Release
needs: [tagging]
steps:
- name: Git Checkout
uses: actions/checkout@v6
- name: Set application version
run: |
echo "PACKAGE=v$(echo `cat package.json | jq -r .version`)" >> $GITHUB_ENV
- name: Create Release
uses: actions/github-script@v8
id: release
if: ${{ env.PACKAGE }}
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const { repo: { owner, repo }, sha } = context;
const tag = process.env.PACKAGE;
let release_id = 0;
try {
const release = await github.rest.repos.createRelease({
owner,
repo,
tag_name: tag,
generate_release_notes: true
});
release_id = release.data.id;
} catch (e) {
if (e.status == 422) { // Release already exists
const latest = await github.rest.repos.getLatestRelease({
owner,
repo
});
release_id = latest.data.id;
} else {
throw e;
}
}
return release_id
npm:
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'main') }}
name: NPM Package Release
needs: [tagging, release]
permissions:
contents: read
id-token: write
steps:
- name: Git Checkout
uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: NPM Release
run: |
npm ci
npm run build --if-present
npm test
npm publish