This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
chore(deps): update opentelemetry-collector-contrib to v0.111.0 (#211) #202
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
name: Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
draft_release: | |
runs-on: ubuntu-latest | |
outputs: | |
tag_name: ${{ steps.release-drafter.outputs.tag_name }} | |
steps: | |
# Get next version | |
- uses: release-drafter/release-drafter@v6 | |
id: release-drafter | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: github.event_name == 'workflow_dispatch' | |
needs: draft_release | |
steps: | |
# Create version string from tag (v1.0.0 -> 1.0.0) | |
- name: Create version string | |
run: | | |
export TAG_NAME=${{ needs.draft_release.outputs.tag_name }} | |
echo "VERSION=${TAG_NAME:1}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .tool-versions | |
cache: 'npm' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@kesin11' | |
- name: Setup git config | |
run: | | |
git config user.name "github-actions" | |
git config user.email "github-actions@github.com" | |
- name: Build | |
run: | | |
npm ci | |
npm run clean | |
npm run build | |
- name: Publish @kesin11/github_actions_otel_trace | |
run: | | |
npm -w "@kesin11/github_actions_otel_trace" version $VERSION | |
npm -w "@kesin11/github_actions_otel_trace" publish | |
git push origin main | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: release-drafter/release-drafter@v6 | |
with: | |
publish: true | |
tag: v${{ env.VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |