Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
self-hosted-runner:
labels:
- builder
18 changes: 18 additions & 0 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"release-type": "node",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"plugins": [
{
"type": "node-workspace"
}
],
"packages": {
"packages/client/api": {},
"packages/js-client.node": {},
"packages/js-client.web.standalone": {},
"packages/tools": {},
"packages/core/interfaces": {},
"packages/core/js-peer": {}
}
}
8 changes: 8 additions & 0 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"packages/client/api": "0.10.0",
"packages/js-client.node": "0.5.0",
"packages/js-client.web.standalone": "0.12.0",
"packages/tools": "0.1.0",
"packages/core/interfaces": "0.6.0",
"packages/core/js-peer": "0.7.0"
}
5 changes: 0 additions & 5 deletions .github/workflows/changelog_config.json

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/e2e.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ on:
pull_request:
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/tests.yml"
- "!.github/workflows/snapshot.yml"
push:
branches:
- "master"
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/tests.yml"
- "!.github/workflows/snapshot.yml"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: lint

on:
pull_request:
types:
- opened
- edited
- synchronize

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

reviewdog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Lint actions
uses: reviewdog/action-actionlint@v1
env:
SHELLCHECK_OPTS: "-e SC2086 -e SC2207 -e SC2128"
with:
reporter: github-pr-check
fail_on_error: true
168 changes: 168 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: "release-please"

on:
push:
branches:
- "master"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"

env:
CI: true
FORCE_COLOR: true

jobs:
release-please:
runs-on: ubuntu-latest

outputs:
release-created: ${{ steps.release.outputs.releases_created }}
pr: ${{ steps.release.outputs.pr }}

steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
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

bump-version:
if: needs.release-please.outputs.pr != null
runs-on: ubuntu-latest
needs:
- release-please

permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ fromJson(needs.release-please.outputs.pr).headBranchName }}
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- run: pnpm i --no-frozen-lockfile

- name: Commit version bump
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: Regenerate pnpm lock file"
branch: ${{ fromJson(needs.release-please.outputs.pr).headBranchName }}
commit_user_name: fluencebot
commit_user_email: devops@fluence.one
commit_author: fluencebot <devops@fluence.one>

fluence-js:
if: needs.release-please.outputs.release-created
runs-on: ubuntu-latest
needs:
- release-please

permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v3

- 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 pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- run: pnpm i
- run: pnpm -r build

- name: Publish to npm registry
run: pnpm --no-git-checks -r publish -filter '@fluencelabs/*' --access public --tags unstable

slack:
if: always()
name: "Notify"
runs-on: ubuntu-latest

needs:
- release-please
- fluence-js

permissions:
contents: read
id-token: write

steps:
- uses: lwhiteley/dependent-jobs-result-check@v1
id: status
with:
statuses: failure
dependencies: ${{ toJSON(needs) }}

- name: Log output
run: |
echo "statuses:" "${{ steps.status.outputs.statuses }}"
echo "jobs:" "${{ steps.status.outputs.jobs }}"
echo "found any?:" "${{ steps.status.outputs.found }}"

- 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/slack/release-please webhook | SLACK_WEBHOOK_URL

- uses: ravsamhq/notify-slack-action@v2
if: steps.status.outputs.found == 'true'
with:
status: "failure"
notification_title: "*{workflow}* has {status_message}"
message_format: "${{ steps.status.outputs.jobs }} {status_message} in <{repo_url}|{repo}>"
footer: "<{run_url}>"
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
name: Run tests with worflow_call
name: "ci"

on:
workflow_call:
inputs:
rust-peer-image:
description: "rust-peer image tag"
type: string
default: "fluencelabs/fluence:minimal"
avm-version:
description: "@fluencelabs/avm version"
type: string
default: "null"
marine-js-version:
description: "@fluencelabs/marine-js version"
type: string
default: "null"
ref:
description: "git ref to checkout to"
type: string
default: "master"
pull_request:
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/tests.yml"
- "!.github/workflows/snapshot.yml"
push:
branches:
- "master"
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/tests.yml"
- "!.github/workflows/snapshot.yml"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

env:
RUST_PEER_IMAGE: "${{ inputs.rust-peer-image }}"
RUST_PEER_IMAGE: "fluencelabs/fluence:minimal"
FORCE_COLOR: true
CI: true

Expand All @@ -39,6 +41,7 @@ jobs:
node-version:
- 16.x
- 17.x
- 18.x

steps:
- name: Import secrets
Expand All @@ -63,9 +66,6 @@ jobs:

- name: Checkout
uses: actions/checkout@v3
with:
repository: fluencelabs/fluence-js
ref: ${{ inputs.ref }}

- name: Pull rust-peer image
run: docker pull $RUST_PEER_IMAGE
Expand All @@ -90,23 +90,5 @@ jobs:

- run: pnpm i

- name: Set avm version
if: inputs.avm-version != 'null'
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 != 'null'
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

- run: pnpm -r build
- run: pnpm -r test
Loading