-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.44 KB
/
release.yml
File metadata and controls
52 lines (52 loc) · 1.44 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
45
46
47
48
49
50
51
52
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
uses: ./.github/workflows/tests.yml
secrets: inherit
deploy:
needs: tests
runs-on: ubuntu-latest
container:
image: node:22-slim
steps:
- uses: actions/checkout@v4
- name: Cache node
uses: actions/cache@v4
with:
key: "${{ runner.os }}-node-${{ hashFiles('node_modules') }}"
path: node_modules
- name: Build
run: |-
npm install
npm run build
- name: Deploy packages to npmjs.org
run: |-
export NPM_AUTH_TOKEN=${{ secrets.PUBLIC_YEPCODE_NPM_AUTH_TOKEN }} NPM_SERVER=${{ vars.PUBLIC_YEPCODE_NPM_SERVER }}
cp .npmrc_template .npmrc
npm publish --userconfig ./.npmrc --@yepcode:registry=https://${{ vars.PUBLIC_YEPCODE_NPM_SERVER }}/
- uses: actions/upload-artifact@v4
with:
name: deploy
path: |-
dist/**
create_release:
needs: deploy
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false