-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (77 loc) · 2.28 KB
/
npm-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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Release NU to NPM
on:
push:
tags:
- 'v*.*.*'
jobs:
publish-npm-binaries:
name: Publish NPM packages
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set the release version
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Install node
uses: actions/[email protected]
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- uses: hustcer/[email protected]
with:
version: 0.93.0
- name: Publish to NPM
run: nu nu/npm.nu each --sync
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-npm-base:
name: Publish the base NPM package
needs: publish-npm-binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set the release version
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Install node
uses: actions/[email protected]
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- uses: hustcer/[email protected]
with:
version: 0.93.0
- name: Publish the base package
continue-on-error: true
shell: nu {0}
run: nu nu/npm.nu base --sync
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
test-npm-pkg:
needs: publish-npm-base
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Test Nu@npm on x64-${{matrix.os}}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install node
uses: actions/[email protected]
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Test Nu Install from NPM Registry
shell: bash
run: |
export NU_TAG=`jq -r .distTag npm/app/package.json`
echo "Installing Nu@$NU_TAG from npm..."
npm i --location=global "nushell@$NU_TAG" --registry https://registry.npmjs.org
echo 'Nu version info:'; nu -c 'version'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}