-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (33 loc) · 1003 Bytes
/
onRelease.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
name: publish
on:
release:
types: [released]
# support manual release in case something goes wrong and needs to be repeated or tested
workflow_dispatch:
inputs:
tag:
description: tag that needs to publish
type: string
required: true
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- name: Release
uses: actions/checkout@v3
with:
ref: ${{ inputs.githubTag }}
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.nodeVersion }}
cache: yarn
- run: yarn install --network-timeout 600000
- run: yarn build
- run: npm install --global @salesforce/[email protected]
- run: |
sf-release npm:package:release \
--githubtag ${{ github.event.release.tag_name || inputs.tag || 'latest' }} \
--npmtag ${{ inputs.tag || 'latest' }} \
--no-install
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}