-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (38 loc) · 1.07 KB
/
dev-release.yml
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
name: Create dev release
on:
workflow_dispatch:
inputs:
element:
description: "name of the element folder to be released"
required: true
type: string
preid:
description: "postfix of the released version"
required: false
default: dev
type: string
permissions:
contents: write
jobs:
dev-release:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set up NPM 🔧
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install dependencies 🔧
run: npm ci
- name: Build and publish package 🚀
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
ELEMENT_DIR: elements/${{ inputs.element }}
run: |
npm run styles && \
cd `echo ${ELEMENT_DIR} | tr -d '[]"'` && \
npm run build && \
npm version prerelease --preid ${{ inputs.preid }} && \
npm publish --access=public