Skip to content

627 implement automatic version bump of subprojects #28

627 implement automatic version bump of subprojects

627 implement automatic version bump of subprojects #28

Workflow file for this run

name: Changed-files
on:
pull_request:
branches:
- main
jobs:
changed_files:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
outputs:
status: ${{ steps.check-labels.outputs.status }}
strategy:
matrix:
javascore_subproject: ${{ steps.find-projects.outputs.projects }}

Check failure on line 18 in .github/workflows/bump-version.yml

View workflow run for this annotation

GitHub Actions / Changed-files

Invalid workflow file

The workflow is not valid. .github/workflows/bump-version.yml (Line: 18, Col: 31): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.find-projects.outputs.projects .github/workflows/bump-version.yml (Line: 18, Col: 31): Unexpected value '${{ steps.find-projects.outputs.projects }}'
name: Test changed-files
steps:
- name: Find projects
id: find-projects
uses: actions/github-script@v6
with:
script: |
const projects = [];
const files = await github.actions.getInputs({
token: github.token,
path: '/',
recursive: true
});
for (const file of files) {
if (file.path.endsWith('Cargo.toml')) {
projects.push(file.path.substring(0, file.path.length - 'Cargo.toml'.length));
}
}
return projects;
- name: List subprojects
run: echo ${{ matrix.javascore_subproject }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get javascore files that have changed
working-directory: contracts/javascore
id: javascore
uses: tj-actions/changed-files@v39
with:
files_yaml: |
ibc:
- 'ibc/**'
lightclients:
- 'lightclients/**'
xcall-connection:
- 'xcall-connection/**'
- name: Run step if test file(s) change
if: steps.javascore.outputs.ibc_any_changed == 'true'
run: |
echo "$steps.javascore.outputs.ibc_any_changed"
echo "One or more test file(s) has changed."
echo "List all the files that have changed: ${{ steps.javascore.outputs.ibc_all_changed_files }}"
- name: Run step if doc file(s) change
if: steps.javascore.outputs.lightclients_any_changed == 'true'
run: |
echo "One or more doc file(s) has changed."
echo "List all the files that have changed: ${{ steps.javascore.outputs.lightclients_all_changed_files }}"
- name: Check Label
id: check-labels
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "semver:patch, semver:minor, semver:major"
exit_type: success