-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathnpm-publish-github-packages.yml
More file actions
81 lines (67 loc) · 2.1 KB
/
npm-publish-github-packages.yml
File metadata and controls
81 lines (67 loc) · 2.1 KB
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
name: Node.js Package
on:
release:
types: [created]
env:
VCPKG_SHA: 5ef52b5b75887fb150711f5effb221dd98b99e6f,
NUGET_REGISTRY: https://nuget.pkg.github.com/mathisloge/index.json
NUGET_USERNAME: mathisloge
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
VCPKG_NUGET_REPOSITORY: https://github.com/mathisloge/vcpkg-nuget.git
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
#- os: windows-latest
# architecture: x64
# node_version: 16
- os: ubuntu-latest
mono: mono
architecture: x64
node_version: 16
#- os: macos-latest
# mono: mono
# architecture: x64
# node_version: 16
permissions:
contents: read
packages: write
steps:
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v2
- name: checkout vcpkg
uses: actions/checkout@v2
with:
repository: "dg0yt/vcpkg"
ref: gdal-paths
path: vcpkg
- name: "Setup vcpkg"
shell: bash
run: ./vcpkg/bootstrap-vcpkg.sh
- name: "Setup NuGet Credentials"
shell: "bash"
run: >
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1`
sources add
-source "${{ env.NUGET_REGISTRY }}"
-storepasswordincleartext
-name "GitHub"
-username "${{ env.NUGET_USERNAME }}"
-password "${{ secrets.NUGET_REGISTRY_PAT }}"
- name: "Setup NuGet apikey"
shell: "bash"
run: >
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1`
setapikey "${{ secrets.NUGET_REGISTRY_PAT }}" -Source "${{ env.NUGET_REGISTRY }}"
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
registry-url: 'https://registry.npmjs.org'
- run: npm install
- name: upload release assets
run: npm run postpublish
env:
NODE_PRE_GYP_GITHUB_TOKEN: ${{secrets.NUGET_REGISTRY_PAT}}