2022-12-28 08:30:42 +00:00
|
|
|
name: Publish snapshots
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
fluence-js-version:
|
|
|
|
description: "@fluencejs/fluence version"
|
|
|
|
type: string
|
2022-12-01 15:46:44 +00:00
|
|
|
default: "null"
|
2022-12-02 08:15:26 +00:00
|
|
|
ref:
|
|
|
|
description: "git ref to checkout to"
|
|
|
|
type: string
|
|
|
|
default: "main"
|
2022-09-14 02:59:49 +00:00
|
|
|
outputs:
|
|
|
|
aqua-version:
|
|
|
|
description: "@fluencelabs/aqua version"
|
2023-01-18 11:36:03 +00:00
|
|
|
value: ${{ jobs.aqua-cli.outputs.version }}
|
2023-01-17 13:21:53 +00:00
|
|
|
aqua-lsp-version:
|
2022-12-28 08:30:42 +00:00
|
|
|
description: "@fluencelabs/aqua-language-server-api version"
|
2023-01-17 13:21:53 +00:00
|
|
|
value: ${{ jobs.aqua-lsp.outputs.version }}
|
2022-12-28 08:30:42 +00:00
|
|
|
aqua-api-version:
|
|
|
|
description: "@fluencelabs/aqua-api version"
|
|
|
|
value: ${{ jobs.aqua-api.outputs.version }}
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
compile:
|
2022-09-14 14:36:16 +00:00
|
|
|
name: "Compile"
|
2023-01-17 10:48:02 +00:00
|
|
|
runs-on: builder
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: fluencelabs/aqua
|
2022-12-19 04:27:42 +00:00
|
|
|
ref: ${{ inputs.ref }}
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2022-12-28 08:30:42 +00:00
|
|
|
- name: Generate snapshot version
|
2022-10-10 18:02:30 +00:00
|
|
|
id: version
|
2022-12-28 08:30:42 +00:00
|
|
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
2022-10-10 18:02:30 +00:00
|
|
|
|
2022-09-14 02:59:49 +00:00
|
|
|
- name: Cache Scala
|
|
|
|
uses: coursier/cache-action@v6
|
|
|
|
|
|
|
|
- name: Setup Scala
|
|
|
|
uses: coursier/setup-action@v1
|
2023-01-17 10:48:02 +00:00
|
|
|
with:
|
|
|
|
apps: sbt
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: JS CLI build
|
2022-12-28 08:30:42 +00:00
|
|
|
env:
|
2023-01-18 11:36:03 +00:00
|
|
|
SNAPSHOT: ${{ steps.version.outputs.id }}
|
2022-12-28 08:30:42 +00:00
|
|
|
run: sbt cliJS/fastOptJS
|
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: JS LSP build
|
2022-10-10 18:02:30 +00:00
|
|
|
env:
|
2023-01-18 11:36:03 +00:00
|
|
|
SNAPSHOT: ${{ steps.version.outputs.id }}
|
2023-05-03 13:24:19 +00:00
|
|
|
run: sbt language-server-apiJS/fastOptJS
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: JS API build
|
2022-12-28 08:30:42 +00:00
|
|
|
env:
|
2023-01-18 11:36:03 +00:00
|
|
|
SNAPSHOT: ${{ steps.version.outputs.id }}
|
2023-06-07 12:07:14 +00:00
|
|
|
run: sbt aqua-apiJS/fastOptJS
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: Upload aqua-cli artifact
|
2022-12-28 08:30:42 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
name: aqua-cli
|
2022-12-28 08:30:42 +00:00
|
|
|
path: cli/cli/.js/target/scala-*/cli-fastopt.js
|
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: Upload aqua-api artifact
|
2022-12-28 08:30:42 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
name: aqua-api
|
2023-06-07 12:07:14 +00:00
|
|
|
path: api/aqua-api/.js/target/scala-*/aqua-api-fastopt.js
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: Upload aqua-lsp artifact
|
2022-09-14 02:59:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
name: aqua-lsp
|
2023-05-03 13:24:19 +00:00
|
|
|
path: language-server/language-server-api/.js/target/scala-*/language-server-api-fastopt.js
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
aqua-cli:
|
|
|
|
name: "Publish aqua-cli"
|
2022-09-14 02:59:49 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
needs: compile
|
|
|
|
|
|
|
|
outputs:
|
2022-12-28 08:30:42 +00:00
|
|
|
version: "${{ steps.snapshot.outputs.version }}"
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
2022-12-28 08:30:42 +00:00
|
|
|
- name: Checkout repository
|
2022-09-14 02:59:49 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: fluencelabs/aqua
|
2023-01-13 10:39:03 +00:00
|
|
|
ref: ${{ inputs.ref }}
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: Download aqua-cli artifact
|
2022-09-14 02:59:49 +00:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
name: aqua-cli
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2022-12-28 08:30:42 +00:00
|
|
|
- run: mv scala-*/cli-fastopt.js cli/cli-npm/aqua.js
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
- name: Import secrets
|
2023-01-30 07:36:00 +00:00
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
2022-09-14 02:59:49 +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/npm-registry/basicauth/ci token | NODE_AUTH_TOKEN
|
|
|
|
|
|
|
|
- name: Setup node with self-hosted npm registry
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
registry-url: "https://npm.fluence.dev"
|
2022-12-28 08:30:42 +00:00
|
|
|
cache-dependency-path: "cli/cli-npm/package-lock.json"
|
2022-09-14 02:59:49 +00:00
|
|
|
cache: "npm"
|
|
|
|
|
2022-09-14 14:36:16 +00:00
|
|
|
- run: npm i
|
2022-12-28 08:30:42 +00:00
|
|
|
working-directory: cli/cli-npm
|
2022-09-14 14:36:16 +00:00
|
|
|
|
2022-09-14 02:59:49 +00:00
|
|
|
- name: Set fluence-js version from branch
|
2022-12-01 15:46:44 +00:00
|
|
|
if: inputs.fluence-js-version != 'null'
|
2022-12-28 08:30:42 +00:00
|
|
|
working-directory: cli/cli-npm
|
2022-10-10 18:02:30 +00:00
|
|
|
run: npm i --save -E @fluencelabs/fluence@${{ inputs.fluence-js-version }}
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
- run: npm run build
|
2022-12-28 08:30:42 +00:00
|
|
|
working-directory: cli/cli-npm
|
|
|
|
|
|
|
|
- name: Generate snapshot version
|
|
|
|
id: version
|
|
|
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
|
|
|
|
|
|
|
- name: Publish snapshot
|
|
|
|
id: snapshot
|
|
|
|
uses: fluencelabs/github-actions/npm-publish-snapshot@main
|
|
|
|
with:
|
|
|
|
working-directory: cli/cli-npm
|
|
|
|
id: ${{ steps.version.outputs.id }}
|
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
aqua-api:
|
|
|
|
name: "Publish aqua-api"
|
2022-12-28 08:30:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
needs: compile
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
version: "${{ steps.snapshot.outputs.version }}"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: fluencelabs/aqua
|
2023-01-13 10:39:03 +00:00
|
|
|
ref: ${{ inputs.ref }}
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: Download aqua-api artifact
|
2022-12-28 08:30:42 +00:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
name: aqua-api
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- run: mv scala-*/aqua-api-fastopt.js api/aqua-api-npm/aqua-api.js
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
- name: Import secrets
|
2023-01-30 07:36:00 +00:00
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
2022-12-28 08:30:42 +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/npm-registry/basicauth/ci token | NODE_AUTH_TOKEN
|
|
|
|
|
|
|
|
- name: Setup node with self-hosted npm registry
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
registry-url: "https://npm.fluence.dev"
|
2023-01-18 11:36:03 +00:00
|
|
|
cache-dependency-path: "api/aqua-api-npm/package-lock.json"
|
2022-12-28 08:30:42 +00:00
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- run: npm i
|
2023-01-18 11:36:03 +00:00
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
- name: Set fluence-js version from branch
|
|
|
|
if: inputs.fluence-js-version != 'null'
|
|
|
|
working-directory: cli/cli-npm
|
|
|
|
run: npm i --save-dev -E @fluencelabs/fluence@${{ inputs.fluence-js-version }}
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
- name: Generate snapshot version
|
|
|
|
id: version
|
|
|
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
|
|
|
|
|
|
|
- name: Publish snapshot
|
|
|
|
id: snapshot
|
|
|
|
uses: fluencelabs/github-actions/npm-publish-snapshot@main
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
working-directory: api/aqua-api-npm
|
2022-12-28 08:30:42 +00:00
|
|
|
id: ${{ steps.version.outputs.id }}
|
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
aqua-lsp:
|
|
|
|
name: "Publish aqua-lsp"
|
2022-12-28 08:30:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-24 13:54:42 +00:00
|
|
|
timeout-minutes: 60
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
needs: compile
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
version: "${{ steps.snapshot.outputs.version }}"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: fluencelabs/aqua
|
2023-01-13 10:39:03 +00:00
|
|
|
ref: ${{ inputs.ref }}
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- name: Download aqua-lsp artifact
|
2022-12-28 08:30:42 +00:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
name: aqua-lsp
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
- run: mv scala-*/language-server-api-fastopt.js language-server/language-server-npm/aqua-lsp-api.js
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
- name: Import secrets
|
2023-01-30 07:36:00 +00:00
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
2022-12-28 08:30:42 +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/npm-registry/basicauth/ci token | NODE_AUTH_TOKEN
|
|
|
|
|
|
|
|
- name: Setup node with self-hosted npm registry
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
registry-url: "https://npm.fluence.dev"
|
2023-01-18 11:36:03 +00:00
|
|
|
cache-dependency-path: "language-server/language-server-npm/package-lock.json"
|
2022-12-28 08:30:42 +00:00
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- run: npm i
|
2023-01-18 11:36:03 +00:00
|
|
|
working-directory: language-server/language-server-npm
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2022-11-24 19:21:40 +00:00
|
|
|
- name: Generate snapshot version
|
2022-09-14 02:59:49 +00:00
|
|
|
id: version
|
2022-11-24 19:21:40 +00:00
|
|
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2022-11-24 19:21:40 +00:00
|
|
|
- name: Publish snapshot
|
|
|
|
id: snapshot
|
|
|
|
uses: fluencelabs/github-actions/npm-publish-snapshot@main
|
|
|
|
with:
|
2023-01-18 11:36:03 +00:00
|
|
|
working-directory: language-server/language-server-npm
|
2022-11-24 19:21:40 +00:00
|
|
|
id: ${{ steps.version.outputs.id }}
|