Skip to content

Commit

Permalink
Publish to NPM on GH Release creation and publish with provenance att…
Browse files Browse the repository at this point in the history
…estation
  • Loading branch information
rm3l committed Dec 5, 2023
1 parent 03fed59 commit 3f64458
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Release to NPM registry

on:
push:
tags:
- '*'
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
pkg: [scaffolder-odo-actions-backend, devfile-field-extension]
Expand All @@ -17,7 +19,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18.x'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

Expand All @@ -30,7 +32,7 @@ jobs:
- name: Build
run: yarn --cwd packages/${{ matrix.pkg }} build

- name: Publish to NPM
- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm --prefix packages/${{ matrix.pkg }} publish --access public
run: npm --prefix packages/${{ matrix.pkg }} publish --provenance --access public

0 comments on commit 3f64458

Please sign in to comment.