Skip to content

Merge pull request #43 from emeraldpay/feature/temp_auth #133

Merge pull request #43 from emeraldpay/feature/temp_auth

Merge pull request #43 from emeraldpay/feature/temp_auth #133

Workflow file for this run

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@v3
with:
submodules: true
- name: Auth GCP
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_ARTIFACTS_KEY }}
- name: Setup GCP
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
always-auth: true
- name: Configure NPM
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install JS dependencies
run: yarn install
- name: Build
run: yarn workspaces foreach run build
- name: Pack - core
run: yarn workspace @emeraldpay/api pack -o emeraldpay-api-v%v.tgz
- name: Pack - native
run: yarn workspace @emeraldpay/api-node pack -o emeraldpay-api-node-v%v.tgz
- name: Pack - web
run: yarn workspace @emeraldpay/api-web pack -o emeraldpay-api-web-v%v.tgz
env:
NO_NPM_BINARY: "true"
- name: Check Version
id: package
uses: codex-team/[email protected]
with:
path: packages/core
- name: Upload to GCP
run: |
gsutil cp -n packages/core/*.tgz gs://artifacts.emerald.cash/builds/emerald-api-js/${GITHUB_SHA::8}/
gsutil cp -n packages/node/*.tgz gs://artifacts.emerald.cash/builds/emerald-api-js/${GITHUB_SHA::8}/
gsutil cp -n packages/web/*.tgz gs://artifacts.emerald.cash/builds/emerald-api-js/${GITHUB_SHA::8}/
- name: Links to published artifacts
run: |
echo "Publishing artifacts to:"
echo " https://artifacts.emerald.cash/builds/emerald-api-js/${GITHUB_SHA::8}/emeraldpay-api-v${{ steps.package.outputs.version }}.tgz"
echo " https://artifacts.emerald.cash/builds/emerald-api-js/${GITHUB_SHA::8}/emeraldpay-api-node-v${{ steps.package.outputs.version }}.tgz"
echo " https://artifacts.emerald.cash/builds/emerald-api-js/${GITHUB_SHA::8}/emeraldpay-api-web-v${{ steps.package.outputs.version }}.tgz"