-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.12 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_host:
description: The package registry host.
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@v3
- name: Setup
uses: ./.github/actions/setup
with:
install_dependencies: 'false'
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: .
- name: Get meta
id: meta
run: echo "tgz=$(ls *.tgz | head -n1)" >> $GITHUB_OUTPUT
- name: Publish
uses: rxfork/npm-publish@v1
with:
access: public
target: ${{ steps.meta.outputs.tgz }}
token: ${{ secrets.registry_token }}
registry: ${{ inputs.registry_host }}