-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.01 KB
/
Copy pathpublish-to-npm.yml
File metadata and controls
44 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release shalecss to NPM
on:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install
- name: Build packages
run: npm run build
- name: Publish @shalecss/core
run: npm publish --workspace=@shalecss/core --access public --provenance --tolerate-republish
- name: Publish @shalecss/react
run: npm publish --workspace=@shalecss/react --access public --provenance --tolerate-republish
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--generate-notes