2023-01-24 13:54:42 +00:00
|
|
|
name: "Publish aqua"
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2023-02-01 09:21:33 +00:00
|
|
|
tag:
|
|
|
|
description: "tag to checkout to"
|
2023-01-20 08:54:32 +00:00
|
|
|
type: string
|
|
|
|
required: true
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
2023-02-01 09:21:33 +00:00
|
|
|
tag:
|
|
|
|
description: "tag to checkout to"
|
2023-01-20 08:54:32 +00:00
|
|
|
type: string
|
2023-01-20 08:52:17 +00:00
|
|
|
required: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
compile:
|
|
|
|
runs-on: builder
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
|
|
|
|
2023-01-20 08:52:17 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2023-02-01 09:21:33 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ inputs.tag }}
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: Cache Scala
|
|
|
|
uses: coursier/cache-action@v6
|
|
|
|
|
|
|
|
- name: Setup Scala
|
|
|
|
uses: coursier/setup-action@v1
|
|
|
|
with:
|
|
|
|
apps: sbt
|
|
|
|
|
|
|
|
- name: JS CLI build
|
|
|
|
run: sbt cliJS/fullLinkJS
|
|
|
|
|
|
|
|
- name: JS API build
|
2023-06-07 12:07:14 +00:00
|
|
|
run: sbt aqua-apiJS/fullLinkJS
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: JS LSP build
|
2023-05-03 13:24:19 +00:00
|
|
|
run: sbt language-server-apiJS/fullLinkJS
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: Upload aqua-cli artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-cli
|
|
|
|
path: cli/cli/.js/target/scala-*/cli-opt/main.js
|
|
|
|
|
|
|
|
- name: Upload aqua-api artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-api
|
2023-06-07 12:07:14 +00:00
|
|
|
path: api/aqua-api/.js/target/scala-*/aqua-api-opt/main.js
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: Upload aqua-lsp artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-lsp
|
2023-05-03 13:24:19 +00:00
|
|
|
path: language-server/language-server-api/.js/target/scala-*/language-server-api-opt/main.js
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
aqua-cli:
|
|
|
|
name: "Publish aqua-cli"
|
|
|
|
runs-on: ubuntu-latest
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
needs:
|
|
|
|
- compile
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2023-02-01 09:21:33 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ inputs.tag }}
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: Download aqua-cli artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-cli
|
|
|
|
|
|
|
|
- run: mv scala-*/*/main.js cli/cli-npm/aqua.js
|
|
|
|
|
|
|
|
- name: Import secrets
|
2023-01-30 07:36:00 +00:00
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
2023-01-20 08:52:17 +00:00
|
|
|
with:
|
|
|
|
url: https://vault.fluence.dev
|
|
|
|
path: jwt/github
|
|
|
|
role: ci
|
|
|
|
method: jwt
|
|
|
|
jwtGithubAudience: "https://github.com/fluencelabs"
|
|
|
|
jwtTtl: 300
|
|
|
|
exportToken: false
|
|
|
|
secrets: |
|
|
|
|
kv/npmjs/fluencebot token | NODE_AUTH_TOKEN
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
cache-dependency-path: "cli/cli-npm/package-lock.json"
|
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- run: npm i
|
|
|
|
working-directory: cli/cli-npm
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: cli/cli-npm
|
|
|
|
|
|
|
|
- name: Publish to NPM registry
|
2023-02-01 09:02:19 +00:00
|
|
|
run: npm publish --access public --tag unstable
|
2023-01-20 08:52:17 +00:00
|
|
|
working-directory: cli/cli-npm
|
|
|
|
|
|
|
|
aqua-api:
|
|
|
|
name: "Publish aqua-api"
|
|
|
|
runs-on: ubuntu-latest
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
needs:
|
|
|
|
- compile
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2023-02-01 09:21:33 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ inputs.tag }}
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: Download aqua-api artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-api
|
|
|
|
|
|
|
|
- run: mv scala-*/*/main.js api/aqua-api-npm/aqua-api.js
|
|
|
|
|
|
|
|
- name: Import secrets
|
2023-01-30 07:36:00 +00:00
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
2023-01-20 08:52:17 +00:00
|
|
|
with:
|
|
|
|
url: https://vault.fluence.dev
|
|
|
|
path: jwt/github
|
|
|
|
role: ci
|
|
|
|
method: jwt
|
|
|
|
jwtGithubAudience: "https://github.com/fluencelabs"
|
|
|
|
jwtTtl: 300
|
|
|
|
exportToken: false
|
|
|
|
secrets: |
|
|
|
|
kv/npmjs/fluencebot token | NODE_AUTH_TOKEN
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
cache-dependency-path: "api/aqua-api-npm/package-lock.json"
|
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- run: npm i
|
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
- name: Publish to NPM registry
|
2023-02-01 09:02:19 +00:00
|
|
|
run: npm publish --access public --tag unstable
|
2023-01-20 08:52:17 +00:00
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
aqua-lsp:
|
|
|
|
name: "Publish aqua-lsp"
|
|
|
|
runs-on: ubuntu-latest
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
needs:
|
|
|
|
- compile
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2023-02-01 09:21:33 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ inputs.tag }}
|
2023-01-20 08:52:17 +00:00
|
|
|
|
|
|
|
- name: Download aqua-lsp artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-lsp
|
|
|
|
|
|
|
|
- run: mv scala-*/*/main.js language-server/language-server-npm/aqua-lsp-api.js
|
|
|
|
|
|
|
|
- name: Import secrets
|
2023-01-30 07:36:00 +00:00
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
2023-01-20 08:52:17 +00:00
|
|
|
with:
|
|
|
|
url: https://vault.fluence.dev
|
|
|
|
path: jwt/github
|
|
|
|
role: ci
|
|
|
|
method: jwt
|
|
|
|
jwtGithubAudience: "https://github.com/fluencelabs"
|
|
|
|
jwtTtl: 300
|
|
|
|
exportToken: false
|
|
|
|
secrets: |
|
|
|
|
kv/npmjs/fluencebot token | NODE_AUTH_TOKEN
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
cache-dependency-path: "language-server/language-server-npm/package-lock.json"
|
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- run: npm i
|
|
|
|
working-directory: language-server/language-server-npm
|
|
|
|
|
|
|
|
- name: Publish to NPM registry
|
2023-02-01 09:02:19 +00:00
|
|
|
run: npm publish --access public --tag unstable
|
2023-01-20 08:52:17 +00:00
|
|
|
working-directory: language-server/language-server-npm
|
2023-03-07 10:46:20 +00:00
|
|
|
|
|
|
|
aqua-native:
|
|
|
|
name: "Publish aqua-native"
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
runner:
|
|
|
|
- runs-on: ubuntu-latest
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
static: true
|
|
|
|
- runs-on: macos-latest
|
|
|
|
arch: amd64
|
|
|
|
os: macos
|
|
|
|
static: false
|
|
|
|
needs:
|
|
|
|
- compile
|
|
|
|
uses: ./.github/workflows/binary.yml
|
|
|
|
with:
|
|
|
|
runs-on: ${{ matrix.runner.runs-on }}
|
|
|
|
arch: ${{ matrix.runner.arch }}
|
|
|
|
os: ${{ matrix.runner.os }}
|
|
|
|
static: ${{ matrix.runner.static }}
|