-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (54 loc) · 1.97 KB
/
publish-dev.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
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
name: Publish Development Artifacts
on:
push:
branches:
- master
- ci/*
- release/*
pull_request:
branches:
- master
jobs:
gcp:
name: Publish to GCP
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Setup GCP
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_ARTIFACTS_KEY }}
export_default_credentials: true
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "16.x"
always-auth: true
- name: Configure NPM
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Instal JS dependencies
run: yarn install
- name: Configure Node.js Path
run: npm config set scripts-prepend-node-path true
- name: Pack - core
run: yarn workspace @emeraldpay/emerald-vault-core pack
- name: Pack - native
run: yarn workspace @emeraldpay/emerald-vault-native pack
env:
NO_NPM_BINARY: "true"
- name: Check Version
id: package
uses: codex-team/action-nodejs-package-info@v1
with:
path: packages/core
- name: Upload to GCP
run: |
gsutil cp -n packages/core/*.tgz gs://artifacts.emerald.cash/builds/vault-node/${GITHUB_SHA::8}/
gsutil cp -n packages/native/*.tgz gs://artifacts.emerald.cash/builds/vault-node/${GITHUB_SHA::8}/
- name: Links to published artifacts
run: |
echo "Publishing artifacts to:"
echo " https://artifacts.emerald.cash/builds/vault-node/${GITHUB_SHA::8}/emeraldpay-emerald-vault-core-v${{ steps.package.outputs.version }}.tgz"
echo " https://artifacts.emerald.cash/builds/vault-node/${GITHUB_SHA::8}/emeraldpay-emerald-vault-native-v${{ steps.package.outputs.version }}.tgz"