Skip to content

Commit

Permalink
ci: add deploy web release
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Dec 4, 2024
1 parent 4182773 commit a7715e0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/release-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,22 @@ jobs:
fi
current_version=$(jq -r '.version' "$package_file")
current_version="console-${{inputs.app}}/v$current_version"
if ! git rev-parse "$current_version" >/dev/null 2>&1; then
if [ "${{ inputs.app }}" = "deploy-web" ]; then
current_version="console-web/v$current_version"
elif [ "${{ inputs.app }}" = "api" ]; then
current_version="console-api/v$current_version"
else
echo "Error: Unsupported app type '${{ inputs.app }}'."
exit 1
fi
has_tag=$(git rev-parse "$current_version" >/dev/null 2>&1 && echo "true" || echo "false")
if [ "$has_tag" = "false" ]; then
echo "version=$current_version" >> $GITHUB_OUTPUT
fi
- name: Echo the version and changelog
run: |
echo "---- version start ----"
echo "${{ steps.bumps.outputs.version }}"
echo "---- version end ----"
- name: Create Release
if: ${{ steps.bumps.outputs.version != '' }}
id: create_release
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release-console-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Draft Api Release

on:
push:
branches:
- main
paths:
- 'apps/deploy-web/package.json'

permissions:
contents: write

jobs:
release:
name: Create Release Draft
uses: ./.github/workflows/release-app.yml
secrets: inherit
with:
app: deploy-web

0 comments on commit a7715e0

Please sign in to comment.