Skip to content

Commit

Permalink
Merge branch 'master' into refactor/use-platform-plugin-components
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo authored Dec 6, 2024
2 parents 17f2288 + 2415c4a commit ba1e82d
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:
runs-on: ubuntu-latest
if: >
${{ !github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip release]') &&
!startsWith(github.event.head_commit.message, 'chore') }}
github.actor != 'dependabot[bot]' }}
outputs:
build_exists: ${{ steps.check_build.outputs.build_exists }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -41,31 +40,38 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Set build_exists output
id: check_build
run: |
if ls build/bundle/data-visualizer-*.zip 1> /dev/null 2>&1; then
echo "build_exists=yes" >> $GITHUB_OUTPUT
else
echo "build_exists=no" >> $GITHUB_OUTPUT
fi
- name: Publish to AppHub
if: ${{ steps.check_build.outputs.build_exists == 'yes' }}
run: yarn run d2-app-scripts publish

report-release-result:
runs-on: ubuntu-latest
needs: release
if: >
${{ !github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip release]') }}
if: ${{ always() }}
steps:
- name: Checkout code
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0

- name: Extract version
if: success()
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
id: extract_version
uses: Saionaro/extract-package-version@1.3.0
uses: Saionaro/extract-package-version@v1.3.0

- name: Send success message to analytics-internal-bot slack channel
if: success()
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
id: slack_success
uses: slackapi/[email protected]
with:
Expand Down

0 comments on commit ba1e82d

Please sign in to comment.