2023-01-17 13:21:53 +00:00
|
|
|
name: "release-please"
|
2021-03-22 12:38:31 +00:00
|
|
|
|
|
|
|
on:
|
2023-01-17 13:21:53 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: true
|
2021-04-13 10:37:03 +00:00
|
|
|
|
2021-03-22 12:38:31 +00:00
|
|
|
jobs:
|
2023-01-17 13:21:53 +00:00
|
|
|
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 }}
|
2023-01-18 11:36:03 +00:00
|
|
|
pr: ${{ steps.release.outputs['pr'] }}
|
2023-01-17 13:21:53 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Run release-please
|
|
|
|
id: release
|
|
|
|
uses: google-github-actions/release-please-action@v3
|
|
|
|
with:
|
2023-01-17 17:47:20 +00:00
|
|
|
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
|
2023-01-17 13:21:53 +00:00
|
|
|
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
|
2021-03-22 12:38:31 +00:00
|
|
|
|
2023-01-18 11:36:03 +00:00
|
|
|
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 }}
|
|
|
|
|
|
|
|
- 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: |
|
2023-01-18 11:49:46 +00:00
|
|
|
sed -i 's/aquaVersion =.*/aquaVersion = "${{ steps.version.outputs.version }}"/g' build.sbt
|
2023-01-18 11:36:03 +00:00
|
|
|
|
|
|
|
- name: Set cli version
|
|
|
|
run: npm version ${{ steps.version.outputs.version }}
|
|
|
|
working-directory: cli/cli-npm
|
|
|
|
|
|
|
|
- name: Set api version
|
|
|
|
run: npm version ${{ steps.version.outputs.version }}
|
|
|
|
working-directory: api/aqua-api-npm
|
|
|
|
|
|
|
|
- name: Set lsp version
|
|
|
|
run: npm version ${{ steps.version.outputs.version }}
|
2023-01-18 11:41:08 +00:00
|
|
|
working-directory: language-server/language-server-npm
|
2023-01-18 11:36:03 +00:00
|
|
|
|
|
|
|
- name: Commit version bump
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
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>
|
|
|
|
|
2023-01-20 08:52:17 +00:00
|
|
|
publish:
|
2023-01-17 13:21:53 +00:00
|
|
|
if: needs.release-please.outputs.release-created
|
|
|
|
needs: release-please
|
2023-01-20 08:52:17 +00:00
|
|
|
uses: ./.github/workflows/publish.yml
|
|
|
|
with:
|
|
|
|
version: ${{ needs.release-please.outputs.version }}
|