-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (30 loc) · 1018 Bytes
/
publish.yaml
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
# This workflow will publish releases published on GitHub to NPM.
on:
release:
types:
- released
workflow_dispatch:
inputs:
tag:
description: The tag to publish (for example "coder/v0.0.0")
type: string
required: true
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
npm:
runs-on: ubuntu-latest
steps:
- uses: robinraju/release-downloader@v1.9
with:
tag: ${{ github.event.inputs.tag || github.ref_name }}
fileName: '*.tgz'
# Although we are publishing the tarball, yarn will not actually look at
# the package.json in the tarball so we have to extract it first.
- run: tar -xf *.tgz
- run: mv package/package.json package.json
# Normally publish tries to run a script that packages the plugin but we
# already have it packaged, so ignore scripts.
- run: yarn publish --ignore-scripts *.tgz
env:
YARN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}