Merge pull request #3 from zregvart/main #1
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: npm-publish-antora-extension | |
"on": | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/ec-data-extension/**' | |
permissions: | |
contents: read | |
jobs: | |
release-antora-extension: | |
name: Release to NPM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
disable-telemetry: true | |
- name: Checkout code | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Setup node | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
cache: 'npm' | |
cache-dependency-path: 'docs/ec-data-extension/package-lock.json' | |
node-version-file: 'docs/ec-data-extension/package.json' | |
- name: Publish npm package | |
run: | | |
cd docs/ec-data-extension | |
npm version prerelease --preid ${{ github.sha }} | |
npm publish --access=public | |
git checkout package.json | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |