2023-01-17 13:21:53 +00:00
|
|
|
name: "release-please"
|
2021-03-22 12:38:31 +00:00
|
|
|
|
|
|
|
on:
|
2023-01-17 13:21:53 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: true
|
2021-04-13 10:37:03 +00:00
|
|
|
|
2021-03-22 12:38:31 +00:00
|
|
|
jobs:
|
2023-01-17 13:21:53 +00:00
|
|
|
release-please:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
release-created: ${{ steps.release.outputs.release_created }}
|
|
|
|
tag-name: ${{ steps.release.outputs.tag_name }}
|
|
|
|
version: ${{ steps.release.outputs.version }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Run release-please
|
|
|
|
id: release
|
|
|
|
uses: google-github-actions/release-please-action@v3
|
|
|
|
with:
|
2023-01-17 17:47:20 +00:00
|
|
|
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
|
2023-01-17 13:21:53 +00:00
|
|
|
command: manifest
|
|
|
|
config-file: .github/release-please/config.json
|
|
|
|
manifest-file: .github/release-please/manifest.json
|
|
|
|
|
|
|
|
- name: Show output from release-please
|
|
|
|
if: steps.release.outputs.releases_created
|
|
|
|
env:
|
|
|
|
RELEASE_PLEASE_OUTPUT: ${{ toJSON(steps.release.outputs) }}
|
|
|
|
run: echo "${RELEASE_PLEASE_OUTPUT}" | jq
|
2021-03-22 12:38:31 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
compile:
|
|
|
|
if: needs.release-please.outputs.release-created
|
|
|
|
runs-on: builder
|
|
|
|
needs: release-please
|
2021-03-22 12:38:31 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-12-06 16:45:12 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-03-22 12:38:31 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Cache Scala
|
|
|
|
uses: coursier/cache-action@v6
|
2021-03-22 12:38:31 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Setup Scala
|
|
|
|
uses: coursier/setup-action@v1
|
|
|
|
with:
|
|
|
|
apps: sbt
|
2021-08-31 09:20:22 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: JS CLI build
|
|
|
|
run: sbt cliJS/fullLinkJS
|
2022-05-17 12:05:25 +00:00
|
|
|
env:
|
2023-01-17 13:21:53 +00:00
|
|
|
BUILD_NUMBER: ${{ needs.release-please.outputs.version}}
|
2022-05-17 12:05:25 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: JS API build
|
2022-12-28 08:30:42 +00:00
|
|
|
run: sbt aqua-api/fullLinkJS
|
|
|
|
env:
|
2023-01-17 13:21:53 +00:00
|
|
|
BUILD_NUMBER: ${{ needs.release-please.outputs.version}}
|
|
|
|
|
|
|
|
- name: JS LSP build
|
|
|
|
run: sbt language-server-api/fullLinkJS
|
2021-04-14 11:15:27 +00:00
|
|
|
env:
|
2023-01-17 13:21:53 +00:00
|
|
|
BUILD_NUMBER: ${{ needs.release-please.outputs.version}}
|
|
|
|
|
|
|
|
- name: Upload aqua-cli artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-14 15:00:51 +00:00
|
|
|
with:
|
2023-01-17 13:21:53 +00:00
|
|
|
name: aqua-cli
|
|
|
|
path: cli/cli/.js/target/scala-*/cli-opt/main.js
|
2021-04-14 15:00:51 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Upload aqua-api artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: aqua-api
|
|
|
|
path: api/aqua-api/target/scala-*/aqua-api-opt/main.js
|
2021-08-13 16:16:14 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Upload aqua-lsp artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
2021-07-27 13:41:23 +00:00
|
|
|
with:
|
2023-01-17 13:21:53 +00:00
|
|
|
name: aqua-lsp
|
|
|
|
path: language-server/language-server-api/target/scala-*/language-server-api-opt/main.js
|
|
|
|
|
|
|
|
aqua-cli:
|
|
|
|
name: "Publish aqua-cli"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- release-please
|
|
|
|
- compile
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Download aqua-cli artifact
|
|
|
|
uses: actions/download-artifact@v3
|
2021-03-22 12:38:31 +00:00
|
|
|
with:
|
2023-01-17 13:21:53 +00:00
|
|
|
name: aqua-cli
|
|
|
|
|
|
|
|
- run: mv scala-*/*/main.js cli/cli-npm/aqua.js
|
2021-07-27 13:41:23 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Import secrets
|
|
|
|
uses: hashicorp/vault-action@v2.4.3
|
2021-07-27 13:41:23 +00:00
|
|
|
with:
|
2023-01-17 13:21:53 +00:00
|
|
|
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"
|
2023-01-17 17:47:20 +00:00
|
|
|
registry-url: "https://registry.npmjs.org"
|
2023-01-17 13:21:53 +00:00
|
|
|
cache-dependency-path: "cli/cli-npm/package-lock.json"
|
|
|
|
cache: "npm"
|
2022-05-17 12:05:25 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Set version
|
|
|
|
run: npm version ${{ needs.release-please.outputs.version }}
|
|
|
|
working-directory: cli/cli-npm
|
2022-05-17 12:05:25 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- run: npm i
|
|
|
|
working-directory: cli/cli-npm
|
2023-01-18 11:04:54 +00:00
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: cli/cli-npm
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Publish to NPM registry
|
|
|
|
run: npm publish --access public
|
|
|
|
working-directory: cli/cli-npm
|
2022-12-30 11:53:14 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
aqua-api:
|
|
|
|
name: "Publish aqua-api"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- release-please
|
|
|
|
- compile
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- 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
|
|
|
|
uses: hashicorp/vault-action@v2.4.3
|
|
|
|
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"
|
2023-01-17 17:47:20 +00:00
|
|
|
registry-url: "https://registry.npmjs.org"
|
2023-01-17 13:21:53 +00:00
|
|
|
cache-dependency-path: "api/aqua-api-npm/package-lock.json"
|
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- name: Set version
|
|
|
|
run: npm version ${{ needs.release-please.outputs.version }}
|
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
- run: npm i
|
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
- name: Publish to NPM registry
|
|
|
|
run: npm publish --access public
|
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
aqua-lsp:
|
|
|
|
name: "Publish aqua-lsp"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- release-please
|
|
|
|
- compile
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- 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
|
|
|
|
uses: hashicorp/vault-action@v2.4.3
|
|
|
|
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"
|
2023-01-17 17:47:20 +00:00
|
|
|
registry-url: "https://registry.npmjs.org"
|
2023-01-17 13:21:53 +00:00
|
|
|
cache-dependency-path: "language-server/language-server-npm/package-lock.json"
|
|
|
|
cache: "npm"
|
|
|
|
|
|
|
|
- name: Set version
|
|
|
|
run: npm version ${{ needs.release-please.outputs.version }}
|
|
|
|
working-directory: language-server/language-server-npm
|
|
|
|
|
|
|
|
- run: npm i
|
|
|
|
working-directory: language-server/language-server-npm
|
2022-05-17 12:05:25 +00:00
|
|
|
|
2023-01-17 13:21:53 +00:00
|
|
|
- name: Publish to NPM registry
|
|
|
|
run: npm publish --access public
|
|
|
|
working-directory: language-server/language-server-npm
|