chore: upgrade @blocklet/sdk #379
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Version Check" | |
on: | |
workflow_call: | |
# Map the workflow outputs to job outputs | |
outputs: | |
folders: | |
description: "The folders that have changed" | |
value: ${{ jobs.check-files.outputs.folders }} | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- edited | |
branches: | |
- master | |
jobs: | |
check-files: | |
if: "! contains(toJSON(github.event.commits.*.message), 'WIP') && !contains(toJSON(github.event.commits.*.message), 'wip')" | |
runs-on: ubuntu-latest | |
name: Check files changed | |
outputs: | |
folders: ${{ steps.format-changed-files.outputs.folders }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v35.8.0 | |
with: | |
files: | | |
blocklets/**/version | |
packages/**/version | |
json: "true" | |
dir_names: true | |
dir_names_exclude_root: true | |
dir_names_max_depth: 2 | |
- name: List all changed files | |
run: | | |
echo "${{ steps.changed-files.outputs.all_changed_files }} was changed" | |
- name: Remove escapement | |
id: format-changed-files | |
run: | | |
echo "folders=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_OUTPUT | |
check-version: | |
name: Check version changed | |
needs: check-files | |
if: " github.event_name == 'pull_request' " | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dir: ${{ fromJSON(needs.check-files.outputs.folders) }} | |
steps: | |
- name: action-version-check | |
uses: arcblock/action-version-check@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
working-directory: ${{ matrix.dir }} |