release(main): release 1.6.1 (#257) #254
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 Please | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Generate token 🔐' | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.TELEMETRY_APP_ID }} | |
private-key: ${{ secrets.TELEMETRY_APP_PRIVATE_KEY }} | |
- name: Update release PR 🔄 | |
uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: node | |
draft-pull-request: true | |
package-name: '@ibm/telemetry-js' | |
pull-request-title-pattern: 'release${scope}: release${component} ${version}' | |
token: ${{ steps.app-token.outputs.token }} | |
# | |
# The logic below handles npm publication | |
# | |
- name: Checkout 🛎 | |
uses: actions/checkout@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Setup Node 🏗 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Install Node Modules 🔧 | |
run: npm install | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Build 🔨 | |
run: | | |
npm run build | |
npm run bundle | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Publish 🚀 | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPMJS_PUBLISH_TOKEN}} | |
if: ${{ steps.release.outputs.release_created }} |