-
-
Notifications
You must be signed in to change notification settings - Fork 615
44 lines (36 loc) · 995 Bytes
/
Copy pathrelease.yml
File metadata and controls
44 lines (36 loc) · 995 Bytes
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
on:
release:
types: [published]
permissions:
contents: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout Repo
uses: actions/checkout@v7
- name: ⬢ Setup Node.js
uses: actions/setup-node@v6
with:
registry-url: https://registry.npmjs.org
node-version: latest
cache: npm
- name: 📦 Install Packages
run: npm ci
- name: 🧮 Set version from tag
run: |
TAG="${{ github.event.release.tag_name }}"
npm version --no-git-tag-version "${TAG#v}"
- name: 🏗 Build
run: npm run build
- name: 🚀 Publish to npm
run: npm publish --provenance --access public
- name: 📦 Upload release asset
uses: softprops/action-gh-release@v3
with:
files: dist/vacuum-card.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}