Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 17 additions & 33 deletions .github/workflows/bat.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
name: Build and Test
on: [push]
permissions:
contents: read

jobs:
plugin-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest
steps:
- uses: actions/checkout@v5
- uses: matlab-actions/setup-matlab@v2
with:
release: latest-including-prerelease
- uses: matlab-actions/run-tests@v2

bat:
name: Build and Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 20
- name: Perform npm tasks
run: npm run ci

name: Build and Test
on: [push]

permissions:
contents: read

jobs:
bat:
name: Build and Test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Perform npm tasks
run: npm run ci
154 changes: 77 additions & 77 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
name: Publish
on:
release:
types: published
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.update-package-version.outputs.version }}
steps:
- uses: actions/checkout@v5
- name: Configure git
run: |
git config user.name 'Release Action'
git config user.email '<>'
- uses: actions/setup-node@v5
with:
node-version: 20
# Call `npm version`. It increments the version and commits the changes.
# We'll save the output (new version string) for use in the following
# steps
- name: Update package version
id: update-package-version
run: |
git tag -d "${{ github.event.release.tag_name }}"
VERSION=$(npm version "${{ github.event.release.tag_name }}" --no-git-tag-version)
git add package.json package-lock.json
git commit -m "[skip ci] Bump $VERSION"
git push origin HEAD:main
# Now carry on, business as usual
- name: Perform npm tasks
run: npm run ci
# Finally, create a detached commit containing the built artifacts and tag
# it with the release. Note: the fact that the branch is locally updated
# will not be relayed (pushed) to origin
- name: Commit to release branch
id: release_info
run: |
# Check for semantic versioning
longVersion="${{github.event.release.tag_name}}"
echo "Preparing release for version $longVersion"
[[ $longVersion == v[0-9]*.[0-9]*.[0-9]* ]] || (echo "must follow semantic versioning" && exit 1)
majorVersion=$(echo ${longVersion%.*.*})
minorVersion=$(echo ${longVersion%.*})
# Add the built artifacts. Using --force because dist/lib should be in
# .gitignore
git add --force dist lib
# Make the commit
MESSAGE="Build for $(git rev-parse --short HEAD)"
git commit --allow-empty -m "$MESSAGE"
git tag -f -a -m "Release $longVersion" $longVersion
# Get the commit of the tag you just released
commitHash=$(git rev-list -n 1 $longVersion)
# Delete the old major and minor version tags locally
git tag -d $majorVersion || true
git tag -d $minorVersion || true
# Make new major and minor version tags locally that point to the commit you got from the "git rev-list" above
git tag -f $majorVersion $commitHash
git tag -f $minorVersion $commitHash
# Force push the new minor version tag to overwrite the old tag remotely
echo "Pushing new tags"
git push -f origin $longVersion
git push -f origin $majorVersion
git push -f origin $minorVersion
name: Publish
on:
release:
types: published
permissions:
contents: write

jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.update-package-version.outputs.version }}
steps:
- uses: actions/checkout@v6
- name: Configure git
run: |
git config user.name 'Release Action'
git config user.email '<>'
- uses: actions/setup-node@v6
with:
node-version: 24

# Call `npm version`. It increments the version and commits the changes.
# We'll save the output (new version string) for use in the following
# steps
- name: Update package version
id: update-package-version
run: |
git tag -d "${{ github.event.release.tag_name }}"
VERSION=$(npm version "${{ github.event.release.tag_name }}" --no-git-tag-version)
git add package.json package-lock.json
git commit -m "[skip ci] Bump $VERSION"
git push origin HEAD:main

# Now carry on, business as usual
- name: Perform npm tasks
run: npm run ci

# Finally, create a detached commit containing the built artifacts and tag
# it with the release. Note: the fact that the branch is locally updated
# will not be relayed (pushed) to origin
- name: Commit to release branch
id: release_info
run: |
# Check for semantic versioning
longVersion="${{github.event.release.tag_name}}"
echo "Preparing release for version $longVersion"
[[ $longVersion == v[0-9]*.[0-9]*.[0-9]* ]] || (echo "must follow semantic versioning" && exit 1)
majorVersion=$(echo ${longVersion%.*.*})
minorVersion=$(echo ${longVersion%.*})

# Add the built artifacts. Using --force because dist/lib should be in
# .gitignore
git add --force dist lib

# Make the commit
MESSAGE="Build for $(git rev-parse --short HEAD)"
git commit --allow-empty -m "$MESSAGE"
git tag -f -a -m "Release $longVersion" $longVersion

# Get the commit of the tag you just released
commitHash=$(git rev-list -n 1 $longVersion)

# Delete the old major and minor version tags locally
git tag -d $majorVersion || true
git tag -d $minorVersion || true

# Make new major and minor version tags locally that point to the commit you got from the "git rev-list" above
git tag -f $majorVersion $commitHash
git tag -f $minorVersion $commitHash

# Force push the new minor version tag to overwrite the old tag remotely
echo "Pushing new tags"
git push -f origin $longVersion
git push -f origin $majorVersion
git push -f origin $minorVersion
6 changes: 0 additions & 6 deletions jest.config.js

This file was deleted.

21 changes: 21 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default {
testEnvironment: "node",
collectCoverage: true,
testMatch: ["**/*.test.ts"],
transform: {
"^.+\\.[jt]s$": [
"ts-jest",
{
diagnostics: {
ignoreCodes: [151002],
},
},
],
},
transformIgnorePatterns: ["node_modules/(?!(@actions)/)"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"^@actions/core$": "<rootDir>/node_modules/@actions/core/lib/core.js",
"^@actions/exec$": "<rootDir>/node_modules/@actions/exec/lib/exec.js",
},
};
Loading
Loading