Skip to content

chore(deps-dev): bump js-yaml from 4.1.1 to 4.3.0 #1027

chore(deps-dev): bump js-yaml from 4.1.1 to 4.3.0

chore(deps-dev): bump js-yaml from 4.1.1 to 4.3.0 #1027

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
tags: ['v**']
workflow_dispatch:
jobs:
test_and_lint:
name: Test and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6.3.0
with:
node-version: 24.x
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run typecheck
end_to_end_tests_macos:
name: Run end to end tests (GitHub.com to GitHub.com on macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6.3.0
with:
node-version: 24.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename macOS binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-macos-x64 bin/gh-migrate-project-darwin-amd64
- name: Create `output` directory
run: mkdir output
- name: Make macOS binary executable
run: chmod +x bin/gh-migrate-project-darwin-amd64
- name: Export a project from GitHub.com
run: ./bin/gh-migrate-project-darwin-amd64 export --project-owner gh-migrate-project-sandbox --project-number 1026 --disable-telemetry
env:
EXPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Copy outputs to output/ directory
run: cp project.json output/ && cp repository-mappings.csv output/
- name: Print outputted project data
run: cat project.json
- name: Print repository mappings template
run: cat repository-mappings.csv
- name: Print assignee mappings template
run: cat assignee-mappings.csv
- name: Fill in repository mappings template
run: |
echo "source_repository,target_repository
gh-migrate-project-sandbox/initial-repository,gh-migrate-project-sandbox/initial-repository" > completed-repository-mappings.csv
- name: Fill in assignee mappings template
run: |
echo "source_login,target_login
timrogers,ghe-admin" > completed-assignee-mappings.csv
- name: Import project to GitHub.com
run: ./bin/gh-migrate-project-darwin-amd64 import --input-path project.json --repository-mappings-path completed-repository-mappings.csv --project-owner gh-migrate-project-sandbox --disable-telemetry
env:
IMPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Upload outputs as artifacts
uses: actions/upload-artifact@v7
with:
name: macos-outputs
path: output
end_to_end_tests_linux:
name: Run end to end tests (GitHub.com to GitHub.com on Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6.3.0
with:
node-version: 24.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename Linux binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-linux-x64 bin/gh-migrate-project-linux-amd64
- name: Create `output` directory
run: mkdir output
- name: Make Linux binary executable
run: chmod +x bin/gh-migrate-project-linux-amd64
- name: Export a project from GitHub.com
run: ./bin/gh-migrate-project-linux-amd64 export --project-owner gh-migrate-project-sandbox --project-number 1026 --disable-telemetry
env:
EXPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Copy outputs to output/ directory
run: cp project.json output/ && cp repository-mappings.csv output/
- name: Print outputted project data
run: cat project.json
- name: Print repository mappings template
run: cat repository-mappings.csv
- name: Print assignee mappings template
run: cat assignee-mappings.csv
- name: Fill in repository mappings template
run: |
echo "source_repository,target_repository
gh-migrate-project-sandbox/initial-repository,gh-migrate-project-sandbox/initial-repository" > completed-repository-mappings.csv
- name: Fill in assignee mappings template
run: |
echo "source_login,target_login
timrogers,ghe-admin" > completed-assignee-mappings.csv
- name: Import project to GitHub.com
run: ./bin/gh-migrate-project-linux-amd64 import --input-path project.json --repository-mappings-path completed-repository-mappings.csv --assignee-mappings-path completed-assignee-mappings.csv --project-owner gh-migrate-project-sandbox --disable-telemetry
env:
IMPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Upload outputs as artifacts
uses: actions/upload-artifact@v7
with:
name: linux-outputs
path: output
end_to_end_tests_windows:
name: Run end to end tests (GitHub.com to GitHub.com on Windows)
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6.3.0
with:
node-version: 24.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename Windows binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-win-x64.exe bin/gh-migrate-project-windows-amd64.exe
- name: Create `output` directory
run: mkdir output
- name: Export a project from GitHub.com
run: bin/gh-migrate-project-windows-amd64.exe export --project-owner gh-migrate-project-sandbox --project-number 1026 --disable-telemetry
env:
EXPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Copy outputs to output/ directory
run: cp project.json output/ && cp repository-mappings.csv output/
- name: Print outputted project data
run: cat project.json
- name: Print repository mappings template
run: cat repository-mappings.csv
- name: Print assignee mappings template
run: cat assignee-mappings.csv
- name: Fill in repository mappings template
run: |
echo "source_repository,target_repository
gh-migrate-project-sandbox/initial-repository,gh-migrate-project-sandbox/initial-repository" > completed-repository-mappings.csv
- name: Fill in assignee mappings template
run: |
echo "source_login,target_login
timrogers,ghe-admin" > completed-assignee-mappings.csv
- name: Import project to GitHub.com
run: bin/gh-migrate-project-windows-amd64.exe import --input-path project.json --repository-mappings-path completed-repository-mappings.csv --assignee-mappings-path completed-assignee-mappings.csv --project-owner gh-migrate-project-sandbox --disable-telemetry
env:
IMPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Upload outputs as artifacts
uses: actions/upload-artifact@v7
with:
name: windows-outputs
path: output
end_to_end_test_import_idempotency:
name: Run end to end test for import idempotency (existing project with pre-added item)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.3.0
with:
node-version: 24.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename Linux binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-linux-x64 bin/gh-migrate-project-linux-amd64
- name: Make Linux binary executable
run: chmod +x bin/gh-migrate-project-linux-amd64
- name: Export source project from GitHub.com
run: ./bin/gh-migrate-project-linux-amd64 export --project-owner gh-migrate-project-sandbox --project-number 1026 --disable-telemetry
env:
EXPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Fill in repository mappings template
run: |
echo "source_repository,target_repository
gh-migrate-project-sandbox/initial-repository,gh-migrate-project-sandbox/initial-repository" > completed-repository-mappings.csv
- name: Fill in assignee mappings template
run: |
echo "source_login,target_login
timrogers,ghe-admin" > completed-assignee-mappings.csv
- name: Create empty target project and pre-add an issue (simulating an auto-add workflow)
id: setup
run: |
npm run setup-import-idempotency-target -- \
--input-path project.json \
--repository-mappings-path completed-repository-mappings.csv \
--project-owner gh-migrate-project-sandbox \
--project-title "idempotency-test-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
env:
GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Import project into the existing target project (must succeed despite the duplicate item)
run: ./bin/gh-migrate-project-linux-amd64 import --input-path project.json --repository-mappings-path completed-repository-mappings.csv --assignee-mappings-path completed-assignee-mappings.csv --project-owner gh-migrate-project-sandbox --project-number ${{ steps.setup.outputs.project_number }} --disable-telemetry
env:
IMPORT_GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
- name: Delete temporary target project
if: always() && steps.setup.outputs.project_number != ''
run: |
npm run cleanup-project -- \
--project-owner gh-migrate-project-sandbox \
--project-number ${{ steps.setup.outputs.project_number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_MIGRATE_PROJECT_SANDBOX_TOKEN }}
smoke_test_arm64_macos:
name: Smoke test arm64 binary on macOS
runs-on: macos-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.3.0
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename macOS arm64 binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-macos-arm64 bin/gh-migrate-project-darwin-arm64
- name: Make macOS arm64 binary executable
run: chmod +x bin/gh-migrate-project-darwin-arm64
- name: Run --help on the macOS arm64 binary
run: ./bin/gh-migrate-project-darwin-arm64 --help
smoke_test_arm64_linux:
name: Smoke test arm64 binary on Linux
runs-on: ubuntu-24.04-arm
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.3.0
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename Linux arm64 binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-linux-arm64 bin/gh-migrate-project-linux-arm64
- name: Make Linux arm64 binary executable
run: chmod +x bin/gh-migrate-project-linux-arm64
- name: Run --help on the Linux arm64 binary
run: ./bin/gh-migrate-project-linux-arm64 --help
smoke_test_arm64_windows:
name: Smoke test arm64 binary on Windows
runs-on: windows-11-arm
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.3.0
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename Windows arm64 binary to conform to GitHub CLI extension rules
run: mv bin/migrate-project-win-arm64.exe bin/gh-migrate-project-windows-arm64.exe
- name: Run --help on the Windows arm64 binary
run: bin/gh-migrate-project-windows-arm64.exe --help
package:
name: Package binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6.3.0
with:
node-version: 24.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate binaries for macOS, Linux and Windows
run: npm run package
- name: Rename macOS binaries to conform to GitHub CLI extension rules
run: |
mv bin/migrate-project-macos-x64 bin/gh-migrate-project-darwin-amd64
mv bin/migrate-project-macos-arm64 bin/gh-migrate-project-darwin-arm64
- name: Rename Windows binaries to conform to GitHub CLI extension rules
run: |
mv bin/migrate-project-win-x64.exe bin/gh-migrate-project-windows-amd64.exe
mv bin/migrate-project-win-arm64.exe bin/gh-migrate-project-windows-arm64.exe
- name: Rename Linux binaries to conform to GitHub CLI extension rules
run: |
mv bin/migrate-project-linux-x64 bin/gh-migrate-project-linux-amd64
mv bin/migrate-project-linux-arm64 bin/gh-migrate-project-linux-arm64
- name: Upload macOS amd64 binary as artifact
uses: actions/upload-artifact@v7
with:
name: package-macos-amd64
path: bin/gh-migrate-project-darwin-amd64
- name: Upload macOS arm64 binary as artifact
uses: actions/upload-artifact@v7
with:
name: package-macos-arm64
path: bin/gh-migrate-project-darwin-arm64
- name: Upload Linux amd64 binary as artifact
uses: actions/upload-artifact@v7
with:
name: package-linux-amd64
path: bin/gh-migrate-project-linux-amd64
- name: Upload Linux arm64 binary as artifact
uses: actions/upload-artifact@v7
with:
name: package-linux-arm64
path: bin/gh-migrate-project-linux-arm64
- name: Upload Windows amd64 binary as artifact
uses: actions/upload-artifact@v7
with:
name: package-windows-amd64
path: bin/gh-migrate-project-windows-amd64.exe
- name: Upload Windows arm64 binary as artifact
uses: actions/upload-artifact@v7
with:
name: package-windows-arm64
path: bin/gh-migrate-project-windows-arm64.exe
check_release_tag_matches_version:
name: Check release tag matches version
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
[
'package',
'test_and_lint',
'end_to_end_tests_windows',
'end_to_end_tests_linux',
'end_to_end_tests_macos',
'end_to_end_test_import_idempotency',
'smoke_test_arm64_macos',
'smoke_test_arm64_linux',
'smoke_test_arm64_windows',
]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
id: get_tag_version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Check version matches
run: ./script/check-version ${{ steps.get_tag_version.outputs.version }}
create_release:
name: Create release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: ['check_release_tag_matches_version']
permissions:
contents: write
steps:
- name: Download Windows amd64 binary
uses: actions/download-artifact@v8
with:
name: package-windows-amd64
path: bin
- name: Download Windows arm64 binary
uses: actions/download-artifact@v8
with:
name: package-windows-arm64
path: bin
- name: Download macOS amd64 binary
uses: actions/download-artifact@v8
with:
name: package-macos-amd64
path: bin
- name: Download macOS arm64 binary
uses: actions/download-artifact@v8
with:
name: package-macos-arm64
path: bin
- name: Download Linux amd64 binary
uses: actions/download-artifact@v8
with:
name: package-linux-amd64
path: bin
- name: Download Linux arm64 binary
uses: actions/download-artifact@v8
with:
name: package-linux-arm64
path: bin
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: |
bin/gh-migrate-project-darwin-amd64
bin/gh-migrate-project-darwin-arm64
bin/gh-migrate-project-linux-amd64
bin/gh-migrate-project-linux-arm64
bin/gh-migrate-project-windows-amd64.exe
bin/gh-migrate-project-windows-arm64.exe
generate_release_notes: true