Skip to content

Commit

Permalink
add publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydanielsencision committed Aug 29, 2024
1 parent f4a39a2 commit b94b44c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI Pipeline - NPM Publish

permissions:
checks: write
contents: write

on:
push:
branches:
- "main"
- "master"

jobs:
read-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.package_version.outputs.version }} # This makes it available to other jobs
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Read version from package.json
id: package_version
run: |
echo "::set-output name=version::$(jq -r '.version' package.json)"
- name: Output the version
run: echo "The version in package.json is ${{ steps.package_version.outputs.version }}"

publish-pipeline:
needs: read-version
name: "Publish"
uses: brandwatch/bw-workflow-actions/.github/workflows/node-deploy-package.yaml@production
with:
version: ${{ needs.read-version.outputs.version }}-pr.${{ github.event.pull_request.number }}
node-version: 20
linter: false
test: false
build-step: true
secrets: inherit

0 comments on commit b94b44c

Please sign in to comment.