forked from JeremyHeleine/Photo-Sphere-Viewer
-
-
Notifications
You must be signed in to change notification settings - Fork 686
41 lines (33 loc) · 979 Bytes
/
pre-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: pre-release
run-name: Pre-release ${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
release:
if: github.repository == 'mistic100/Photo-Sphere-Viewer'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: data
id: data
run: |
echo "NPM_TAG=$(echo ${{ github.event.inputs.version }} | cut -d '-' -f2 -s | cut -d '.' -f1 -s)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'yarn'
- name: build
run: |
yarn install --frozen-lockfile
yarn ci:version ${{ github.event.inputs.version }}
yarn ci:build
- name: npm publish
run: |
yarn ci:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NPM_TAG: ${{ steps.data.outputs.NPM_TAG || 'alpha' }}