2022-12-28 08:30:42 +00:00
|
|
|
name: Publish snapshots
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
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:
|
2023-06-22 11:59:56 +00:00
|
|
|
aqua-snapshots:
|
|
|
|
description: "aqua snapshots"
|
|
|
|
value: ${{ jobs.publish.outputs.snapshots }}
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: true
|
2023-06-22 11:59:56 +00:00
|
|
|
CI: true
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-06-22 11:59:56 +00:00
|
|
|
publish:
|
|
|
|
name: "Publish snapshots"
|
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
|
|
|
|
2023-06-22 11:59:56 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
snapshots: "${{ steps.snapshot.outputs.snapshots }}"
|
|
|
|
|
2022-09-14 02:59:49 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-09-11 12:42:20 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-09-14 02:59:49 +00:00
|
|
|
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-06-22 11:59:56 +00:00
|
|
|
- name: scala-js build
|
2022-10-10 18:02:30 +00:00
|
|
|
env:
|
2023-01-18 11:36:03 +00:00
|
|
|
SNAPSHOT: ${{ steps.version.outputs.id }}
|
2023-09-18 07:53:25 +00:00
|
|
|
run: sbt ";language-server-apiJS/fastBundleJS;aqua-apiJS/fastBundleJS"
|
2022-09-14 02:59:49 +00:00
|
|
|
|
|
|
|
- name: Import secrets
|
2023-08-01 10:35:04 +00:00
|
|
|
uses: hashicorp/vault-action@v2.7.3
|
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
|
|
|
|
|
2023-06-22 11:59:56 +00:00
|
|
|
- name: Setup pnpm
|
2023-08-01 10:35:04 +00:00
|
|
|
uses: pnpm/action-setup@v2.4.0
|
2022-12-28 08:30:42 +00:00
|
|
|
with:
|
2023-06-22 11:59:56 +00:00
|
|
|
version: 8
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
- name: Setup node with self-hosted npm registry
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-08-24 10:20:34 +00:00
|
|
|
node-version: "18"
|
2022-12-28 08:30:42 +00:00
|
|
|
registry-url: "https://npm.fluence.dev"
|
2023-06-22 11:59:56 +00:00
|
|
|
cache: "pnpm"
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-12-07 12:06:51 +00:00
|
|
|
- run: pnpm --filter='!integration-tests' -r i
|
2022-12-28 08:30:42 +00:00
|
|
|
|
2023-06-22 11:59:56 +00:00
|
|
|
- name: Set package version
|
|
|
|
run: node ci.cjs bump-version ${{ steps.version.outputs.id }}
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2023-12-07 12:06:51 +00:00
|
|
|
- run: pnpm --filter='!integration-tests' -r build
|
2022-09-14 02:59:49 +00:00
|
|
|
|
2022-11-24 19:21:40 +00:00
|
|
|
- name: Publish snapshot
|
|
|
|
id: snapshot
|
2023-06-22 11:59:56 +00:00
|
|
|
uses: fluencelabs/github-actions/pnpm-publish-snapshot@main
|
2022-11-24 19:21:40 +00:00
|
|
|
with:
|
|
|
|
id: ${{ steps.version.outputs.id }}
|
2023-06-22 11:59:56 +00:00
|
|
|
set-version: false
|