Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9069012
test npm version bump
Ismoh Oct 13, 2025
85c8eb3
feat: add GitHub action for easier release creation
Ismoh Oct 13, 2025
a607574
chore: change version from testing
Ismoh Oct 13, 2025
b2c41b9
chore: fix missing git checkout
Ismoh Oct 13, 2025
a783cf4
chore: fix typo when using bash variable
Ismoh Oct 13, 2025
eb5744c
chore: fix missing CHANGELOG.md changes
Ismoh Oct 13, 2025
62e3887
chore: fix git diff compared to master
Ismoh Oct 13, 2025
9647f93
chore: fix git diff compared to master
Ismoh Oct 13, 2025
fd3bc2c
chore: add log for testing
Ismoh Oct 13, 2025
773b20b
chore: add fetch all to git checkout action
Ismoh Oct 13, 2025
9cb8a92
chore: fix GitHub action workflow
Ismoh Oct 13, 2025
48774a8
chore: make script executable
Ismoh Oct 13, 2025
0a833f7
chore: fix rm by ignoring missing files
Ismoh Oct 13, 2025
defce7d
chore: add installation of missing eslint
Ismoh Oct 13, 2025
f0ffc51
chore: add missing npm install command
Ismoh Oct 13, 2025
620bcb8
chore: clean npm commands
Ismoh Oct 13, 2025
718d365
chore: add proper artifact name
Ismoh Oct 13, 2025
84050de
chore: fix artifact path
Ismoh Oct 13, 2025
891fb4c
chore: fix env declaration
Ismoh Oct 13, 2025
bff6cef
chore: add creating git tag
Ismoh Oct 13, 2025
cad4fac
chore: fix git who am i
Ismoh Oct 13, 2025
479cf5c
chore: fix version variable for pushing tags
Ismoh Oct 13, 2025
78c01f3
chore: fix version variable for pushing tags
Ismoh Oct 13, 2025
aed27bd
chore: fix CHANGELOG.md changes check
Ismoh Oct 13, 2025
500c234
chore: fix CHANGELOG.md changes check
Ismoh Oct 13, 2025
9415425
chore: fix CHANGELOG.md changes check
Ismoh Oct 13, 2025
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
42 changes: 42 additions & 0 deletions .github/workflows/release-tag-bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
prevVer=$(node -p "require('./package.json').version")
echo "Current version: $prevVer"

msgs=$(git log --oneline $(git describe --tags --abbrev=0)..HEAD)

#echo ${msgs,,}

if [[ ${msgs,,} =~ (fix:|refactoring:) ]]; then
echo "--> Bump patch version to "
npm --no-git-tag-version version patch
#else
# echo "no 'fix:' or 'refactoring:' commit message found.."
fi

if [[ ${msgs,,} =~ feat: ]]; then
echo "--> Bump minor version to "
npm --no-git-tag-version version minor
#else
# echo "no 'feat:' commit meassage found.."
fi

if [[ ${msgs,,} =~ (breaking change:|!:) ]]; then
echo "--> Bump major version to "
npm --no-git-tag-version version major
#else
# echo "no 'BREAKING CHANGE' or '!' found.."
fi

newVer=$(node -p "require('./package.json').version")
echo "New version: $newVer"

if [[ "$prevVer" == "$newVer" ]]; then
message="Unable to find actual version changes. Did you use proper conventional commit messages? Available types/scopes: 'fix:', 'refactoring:', 'feat:', 'breaking changes:' or '<type/scope>!:'"
echo "::error file=${name},line=${line},endLine=${endLine},title=${title}::${message}"
exit 1
fi

if [[ ! "$(cat CHANGELOG.md)" =~ "$newVer" ]]; then
message='Unable to find new version in CHANGELOG.md. Do proper changes and rerun this job!'
echo "::error file=${name},line=${line},endLine=${endLine},title=${title}::${message}"
exit 1
fi
43 changes: 43 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release tag before publish
on: workflow_dispatch
jobs:
release-tag:
name: Create new release tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
fetch-depth: 0
fetch-tags: true

- name: Install npm eslint
run: npm install -g eslint

- name: npm install packages
run: npm install

- name: Bump version
run: .github/workflows/release-tag-bump-version.sh

- name: clean
run: rm -f debugger/*.lua; rm -f debugger/*.lua.map; rm -f extension/*.js; rm -f extension/*.js.map; rm -f *.vsix

- name: npm run lint, build and vsce package within npm run bundle
run: npm run bundle

- name: Provide proper artifact name
run: |
echo "artifact_name=$(find second-local-lua-debugger-vscode-*)" >> $GITHUB_ENV

- name: Create and push new release tag
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
releaseVer=$(node -p "require('./package.json').version")
git tag -a release-v$releaseVer -m 'Bump new release version release-v$releaseVer before publish'; git push origin release-v$releaseVer; git push origin --tags

- uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: second-local-lua-debugger-vscode-*.vsix
5 changes: 4 additions & 1 deletion .github/workflows/vsce-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install vsce
run: npm install -g @vscode/vsce
- name: Install npm

- name: npm install packages
run: npm install

- name: Publish to VSCode Marketplace
run: npm run bundle && vsce publish -p ${{ secrets.AZURE_PAT }}
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/../../.vscode/extensions/ismoh-games.second-local-lua-debugger-vscode-0.3.6"
"--extensionDevelopmentPath=${workspaceFolder}/../../.vscode/extensions/ismoh-games.second-local-lua-debugger-vscode-0.3.9"
],
"outFiles": [
"${workspaceFolder}/../../.vscode/extensions/ismoh-games.second-local-lua-debugger-vscode-0.3.6/**/*.js"
"${workspaceFolder}/../../.vscode/extensions/ismoh-games.second-local-lua-debugger-vscode-0.3.9/**/*.js"
],
// "preLaunchTask": "npm: watch"
},
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Version 0.4.0

- feat: add GitHub action for easier release creation \
Refs: [#14](https://github.com/Ismoh/local-lua-debugger-vscode/issues/14)

## Version 0.3.9

- fix: [#25](https://github.com/Ismoh/local-lua-debugger-vscode/issues/25): Change the error wrapper to pass the original error intact ([#26](https://github.com/Ismoh/local-lua-debugger-vscode/pull/26))
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"corona"
],
"scripts": {
"lint-debugger": "cd debugger && eslint . && cd ..",
"lint-extension": "cd extension && eslint . && cd ..",
"lint-debugger": "cd debugger && eslint . --fix && cd ..",
"lint-extension": "cd extension && eslint . --fix && cd ..",
"lint": "npm run lint-debugger && npm run lint-extension",
"build-debugger": "tstl -p debugger",
"build-extension": "tsc -p extension",
Expand Down