aqua/.github/workflows/publish.yml
Anatolios Laskaris aa10706506
chore: Refactor CI after moving tests from aqua-playground [fixes FLU-352] (#763)
* move integration tests to repo

* Move aqua-playground CI

* Fix

* Use local aqua cli

* Move aqua tests to e2e

* Test new build.sbt

* Fix?

* Test

* Test

* Test

* Test

* Update

* Fix

* Fix

* Fix

* fix

* Fix

* Rename aqua-api to api directory for consistency

* Migrate to pnpm

* Add bump version script

* Test snapshot workflow

* fix

* Fix

* Fix

* Setup pnpm

* Update pnpm version

* Fix

* Do not publish tests

* Update

* Fix

* Fix?

* delete import

* Fix

* Fix

* Fix?

* Fix

* Fix

* Use main branch

* Fix quotes

* Fix

* Fix release

* Cleanup

* Remove compiled examples

* Cleanup

---------

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2023-06-22 14:59:56 +03:00

113 lines
2.4 KiB
YAML

name: "Publish aqua"
on:
workflow_dispatch:
inputs:
tag:
description: "tag to checkout to"
type: string
required: true
workflow_call:
inputs:
tag:
description: "tag to checkout to"
type: string
required: true
env:
FORCE_COLOR: true
jobs:
publish:
runs-on: builder
timeout-minutes: 60
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Setup Scala
uses: coursier/setup-action@v1
with:
apps: sbt
- name: scala-js build
run: sbt ";cliJS/fullLinkJS;language-server-apiJS/fullLinkJS;aqua-apiJS/fullLinkJS"
aqua-cli:
name: "Publish aqua-cli"
runs-on: ubuntu-latest
timeout-minutes: 60
needs:
- compile
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}
- name: Import secrets
uses: hashicorp/vault-action@v2.5.0
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 pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 8
- name: Setup node with self-hosted npm registry
uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- run: pnpm -r i
- run: pnpm -r build
- name: Publish to NPM registry
run: pnpm publish --access public --tag unstable
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
uses: ./.github/workflows/binary.yml
with:
runs-on: ${{ matrix.runner.runs-on }}
arch: ${{ matrix.runner.arch }}
os: ${{ matrix.runner.os }}
static: ${{ matrix.runner.static }}