mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
e0513a6218
chore(deps): update all github-actions Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
155 lines
4.4 KiB
YAML
155 lines
4.4 KiB
YAML
name: "release-please"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
|
|
env:
|
|
FORCE_COLOR: true
|
|
|
|
jobs:
|
|
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 }}
|
|
pr: ${{ steps.release.outputs['pr'] }}
|
|
|
|
steps:
|
|
- name: Run release-please
|
|
id: release
|
|
uses: google-github-actions/release-please-action@v4
|
|
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
|
|
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@v4
|
|
with:
|
|
ref: ${{ fromJson(needs.release-please.outputs.pr).headBranchName }}
|
|
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
|
|
|
|
- name: Get aqua version
|
|
id: version
|
|
run: |
|
|
version="$(jq -r '.[]' .github/release-please/manifest.json)"
|
|
echo "version=${version}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set version in build.sbt
|
|
run: |
|
|
sed -i 's/aquaVersion =.*/aquaVersion = "${{ steps.version.outputs.version }}"/g' build.sbt
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4.0.0
|
|
with:
|
|
version: 8
|
|
|
|
- name: Setup node with self-hosted npm registry
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "18"
|
|
registry-url: "https://registry.npmjs.org"
|
|
cache: "pnpm"
|
|
|
|
- name: Set api version
|
|
run: pnpm version ${{ steps.version.outputs.version }}
|
|
working-directory: api/api-npm
|
|
|
|
- name: Set lsp version
|
|
run: pnpm version ${{ steps.version.outputs.version }}
|
|
working-directory: language-server/language-server-npm
|
|
|
|
- name: Set aqua version in tests
|
|
run: |
|
|
pnpm add @fluencelabs/aqua-api@${{ steps.version.outputs.version }} --save-workspace-protocol=false
|
|
working-directory: integration-tests
|
|
|
|
- name: Regenerate lock
|
|
run: pnpm -r i
|
|
|
|
- name: Commit version bump
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: "chore: Bump aqua version to ${{ steps.version.outputs.version }}"
|
|
branch: ${{ fromJson(needs.release-please.outputs.pr).headBranchName }}
|
|
commit_user_name: fluencebot
|
|
commit_user_email: devops@fluence.one
|
|
commit_author: fluencebot <devops@fluence.one>
|
|
|
|
publish:
|
|
if: needs.release-please.outputs.release-created
|
|
needs: release-please
|
|
uses: ./.github/workflows/publish.yml
|
|
with:
|
|
tag: ${{ github.ref }}
|
|
|
|
slack:
|
|
if: always()
|
|
name: "Notify"
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
- release-please
|
|
- publish
|
|
|
|
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@v3.0.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/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}>"
|