-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.13 KB
/
_publish.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
42
43
44
45
46
---
name: _publish
on:
workflow_call:
inputs:
artifact_name:
description: The artifact name.
type: string
required: true
registry_url:
description: The package registry url.
type: string
required: true
secrets:
registry_token:
description: The package registry token.
required: true
jobs:
publish:
name: Publish package
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
install_dependencies: 'false'
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: .
- name: Get meta
id: meta
run: echo "tgz=$(ls *.tgz | head -n1)" >> $GITHUB_OUTPUT
- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
access: public
token: ${{ secrets.registry_token }}
registry: ${{ inputs.registry_url }}
package: ${{ steps.meta.outputs.tgz }}