mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-13 05:55:33 +00:00
105 lines
2.9 KiB
YAML
105 lines
2.9 KiB
YAML
name: Publish snapshot
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
avm-version:
|
|
description: "@fluencelabs/avm version"
|
|
type: string
|
|
marine-js-version:
|
|
description: "@fluencelabs/marine-js version"
|
|
type: string
|
|
ref:
|
|
description: "git ref to checkout to"
|
|
type: string
|
|
default: "master"
|
|
outputs:
|
|
fluence-js-version:
|
|
description: "@fluencelabs/fluence version"
|
|
value: ${{ jobs.publish-snapshot.outputs.fluence-js-version }}
|
|
|
|
env:
|
|
FORCE_COLOR: true
|
|
CI: true
|
|
|
|
jobs:
|
|
publish-snapshot:
|
|
name: "Publish snapshot"
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
fluence-js-version: "${{ steps.snapshot.outputs.version }}"
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout fluence-js
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: fluencelabs/fluence-js
|
|
ref: ${{ inputs.ref }}
|
|
|
|
- uses: pnpm/action-setup@v2.2.4
|
|
with:
|
|
version: 7
|
|
|
|
- name: Setup node with self-hosted npm registry
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16"
|
|
registry-url: "https://npm.fluence.dev"
|
|
cache: "pnpm"
|
|
|
|
- run: pnpm i
|
|
|
|
- name: Set avm version
|
|
if: inputs.avm-version != ''
|
|
uses: fluencelabs/github-actions/npm-set-dependency@main
|
|
with:
|
|
package: "@fluencelabs/avm"
|
|
version: ${{ inputs.avm-version }}
|
|
working-directory: packages/fluence-js
|
|
package-manager: pnpm
|
|
|
|
- name: Set marine-js version
|
|
if: inputs.marine-js-version != ''
|
|
uses: fluencelabs/github-actions/npm-set-dependency@main
|
|
with:
|
|
package: "@fluencelabs/marine-js"
|
|
version: ${{ inputs.marine-js-version }}
|
|
working-directory: packages/fluence-js
|
|
package-manager: pnpm
|
|
|
|
- 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/npm-registry/basicauth/ci token | NODE_AUTH_TOKEN
|
|
|
|
- name: Generate snapshot version
|
|
id: version
|
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
|
|
|
- name: Set package version
|
|
run: node ci.js bump-version ${{ steps.version.outputs.id }}
|
|
|
|
- run: pnpm -r build
|
|
|
|
- name: Publish snapshots
|
|
id: snapshot
|
|
uses: fluencelabs/github-actions/npm-publish-snapshot@main
|
|
with:
|
|
working-directory: packages/fluence-js
|
|
id: ${{ steps.version.outputs.id }}
|
|
package-manager: pnpm
|
|
flags: "-r --registry https://npm.fluence.dev --no-git-checks --tag snapsot -filter '@fluencelabs/*'"
|