Compare commits
2 Commits
dependabot
...
feature/re
Author | SHA1 | Date | |
---|---|---|---|
7feb0fc694 | |||
ea2383234f |
2
.github/config.conf
vendored
Normal file
2
.github/config.conf
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
[branch_validation]
|
||||
valid_prefixes = feature/,fix/,refactoring/,testing/,dependabot/,gh-pages
|
36
.github/workflows/CreateRelease.yml
vendored
36
.github/workflows/CreateRelease.yml
vendored
@@ -4,7 +4,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'dev/*'
|
||||
paths:
|
||||
- 'package.json'
|
||||
workflow_dispatch: # Allows manual execution of the workflow.
|
||||
@@ -23,8 +22,14 @@ jobs:
|
||||
with:
|
||||
node-version: '20.8.0'
|
||||
|
||||
- name: Install dependencies, run tests and build
|
||||
run: npm run prepare:deploy
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run Tests
|
||||
run: npm run test:verbose
|
||||
|
||||
- name: Build the Project
|
||||
run: npm run build:tsc
|
||||
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
@@ -72,9 +77,8 @@ jobs:
|
||||
echo "Generating release notes from ${{ env.PREVIOUS_TAG }} to HEAD..."
|
||||
repo_url=$(git config --get remote.origin.url)
|
||||
notes=$(git log ${{ env.PREVIOUS_TAG }}..HEAD --pretty=format:"- [\`%h\`]($repo_url/commit/%H): %s%n")
|
||||
echo "See [CHANGELOG.md](./CHANGELOG.md) for more details."
|
||||
echo "Release notes:"
|
||||
echo "$notes"
|
||||
echo ""
|
||||
echo "### Changes in this release" > release_notes.md
|
||||
echo "$notes" >> release_notes.md
|
||||
shell: bash
|
||||
@@ -86,6 +90,17 @@ jobs:
|
||||
git config --local user.email "actions@github.com"
|
||||
shell: bash
|
||||
|
||||
# - name: Create temporary branch
|
||||
# id: create_temp_branch
|
||||
# if: steps.check_version.outputs.skip_release == 'false'
|
||||
# run: |
|
||||
# git checkout --orphan release/v${{ env.VERSION }}
|
||||
# git reset
|
||||
# rm -f .gitignore
|
||||
# git add README.md package.json LICENSE dist/ src/ tsconfig.json
|
||||
# git commit -m "Prepare files for release ${{ env.VERSION }}"
|
||||
# shell: bash
|
||||
|
||||
- name: Create and push tag
|
||||
id: create_tag
|
||||
if: steps.check_version.outputs.skip_release == 'false'
|
||||
@@ -96,15 +111,6 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
shell: bash
|
||||
|
||||
- name: Set Release Prerelease Flag
|
||||
id: set_prerelease_flag
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
echo "PRE_RELEASE=false" >> $GITHUB_ENV
|
||||
elif [[ "${{ github.ref }}" == refs/heads/dev/* ]]; then
|
||||
echo "PRE_RELEASE=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Release
|
||||
if: steps.check_version.outputs.skip_release == 'false'
|
||||
uses: softprops/action-gh-release@v2
|
||||
@@ -112,6 +118,6 @@ jobs:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
name: Release ${{ env.VERSION }}
|
||||
body_path: release_notes.md
|
||||
prerelease: ${{ env.PRE_RELEASE }}
|
||||
prerelease: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
25
.github/workflows/ValidateBranchName.yml
vendored
25
.github/workflows/ValidateBranchName.yml
vendored
@@ -3,7 +3,8 @@ name: Validate Branch Name on Pull Request
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- UNDEFINED
|
||||
- main
|
||||
workflow_dispatch: # Allows manual execution of the workflow.
|
||||
|
||||
jobs:
|
||||
validate-branch-name-on-pull-request:
|
||||
@@ -13,11 +14,27 @@ jobs:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read Config File
|
||||
id: config
|
||||
run: |
|
||||
VALID_PREFIXES=$(grep 'valid_prefixes' .github/config.conf | cut -d '=' -f2 | tr -d ' ')
|
||||
echo "VALID_PREFIXES=$VALID_PREFIXES" >> $GITHUB_ENV
|
||||
|
||||
- name: Validate Branch Name on Pull Request
|
||||
run: |
|
||||
BRANCH_NAME=${GITHUB_HEAD_REF}
|
||||
if [[ ! "$BRANCH_NAME" =~ ^(feature\/|fix\/|refactoring\/|testing\/|dependabot\/|gh-pages) ]]; then
|
||||
BRANCH_NAME=${{ github.head_ref }}
|
||||
VALID_PREFIXES_ARRAY=(${VALID_PREFIXES//,/ })
|
||||
VALID=false
|
||||
|
||||
for PREFIX in "${VALID_PREFIXES_ARRAY[@]}"; do
|
||||
if [[ "$BRANCH_NAME" =~ ^$PREFIX ]]; then
|
||||
VALID=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$VALID" = false ]; then
|
||||
echo "Invalid branch name: $BRANCH_NAME"
|
||||
echo "Branch name must start with 'feature/', 'fix/', 'refactoring/', 'testing/', dependabot/" or "gh-pages"
|
||||
echo "Branch name must start with one of the following prefixes: $VALID_PREFIXES"
|
||||
exit 1
|
||||
fi
|
||||
|
@@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Added
|
||||
|
||||
- Add pre release building to release workflow on dev/* branches an version changes.
|
||||
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
24
package-lock.json
generated
24
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ts-injex",
|
||||
"version": "0.1.0",
|
||||
"version": "0.0.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ts-injex",
|
||||
"version": "0.1.0",
|
||||
"version": "0.0.9",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
@@ -25,7 +25,7 @@
|
||||
"eslint-plugin-override": "https://github.com/PxaMMaxP/eslint-plugin-override",
|
||||
"istanbul-badges-readme": "^1.9.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
"ts-jest": "^29.2.3",
|
||||
"typedoc": "^0.26.5",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
@@ -6570,20 +6570,20 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-jest": {
|
||||
"version": "29.2.5",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz",
|
||||
"integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==",
|
||||
"version": "29.2.4",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.4.tgz",
|
||||
"integrity": "sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"bs-logger": "^0.2.6",
|
||||
"bs-logger": "0.x",
|
||||
"ejs": "^3.1.10",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"fast-json-stable-stringify": "2.x",
|
||||
"jest-util": "^29.0.0",
|
||||
"json5": "^2.2.3",
|
||||
"lodash.memoize": "^4.1.2",
|
||||
"make-error": "^1.3.6",
|
||||
"semver": "^7.6.3",
|
||||
"yargs-parser": "^21.1.1"
|
||||
"lodash.memoize": "4.x",
|
||||
"make-error": "1.x",
|
||||
"semver": "^7.5.3",
|
||||
"yargs-parser": "^21.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"ts-jest": "cli.js"
|
||||
|
@@ -22,8 +22,7 @@
|
||||
"docs:fix:coverage": "node scripts/fix-coverage-paths.cjs",
|
||||
"docs:generate:badge": "node scripts/generate-badge.cjs",
|
||||
"docs:fix:escape": "node scripts/replace-doc-escaping.cjs",
|
||||
"version:show": "node -e \"console.log(require('./package.json').version)\"",
|
||||
"prepare:deploy": "npm install && npm run test:verbose && npm run build:tsc"
|
||||
"version:show": "node -e \"console.log(require('./package.json').version)\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -44,7 +43,7 @@
|
||||
"eslint-plugin-jsdoc": "^50.2.2",
|
||||
"eslint-plugin-override": "https://github.com/PxaMMaxP/eslint-plugin-override",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
"ts-jest": "^29.2.3",
|
||||
"typedoc": "^0.26.5",
|
||||
"istanbul-badges-readme": "^1.9.0",
|
||||
"axios": "^1.7.2"
|
||||
|
Reference in New Issue
Block a user