Skip to content

Commit

Permalink
feat(global): add CI for publish on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
extg3 committed May 26, 2024
1 parent 22cc5bb commit 7ac13f5
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish

on:
push:
tags:
- v*.*.*

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # needed for provenance data generation
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm ci
shell: bash

- name: Print Environment Info
run: npx nx report
shell: bash

- name: Build packages
run: npx nx run-many --target=build
shell: bash

- name: Publish packages
run: npx nx release publish
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
NPM_CONFIG_PROVENANCE: true

0 comments on commit 7ac13f5

Please sign in to comment.