From 4f4145faa05f89e09fdaf52bd2a2b44c0b12b44f Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:32:49 +0200 Subject: [PATCH 01/18] Prevent duplicate releases in workflow Added a check to ensure the version already exists as a tag before creating a new release. This prevents creating duplicate releases and refines the version comparison logic by changing the exit status to 0 when the version hasn't changed. --- .github/workflows/CreateRelease.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index c8460e6..89acd11 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -54,9 +54,16 @@ jobs: - name: Check if version changed id: check_version run: | + # Check if the version already exists as a tag + if git rev-parse "refs/tags/${{ env.VERSION }}" >/dev/null 2>&1; then + echo "Version ${{ env.VERSION }} already exists as a tag. No release will be created." + exit 0 + fi + + # Compare current version with previous tag if [ "${{ env.VERSION }}" == "${{ env.PREVIOUS_TAG }}" ]; then echo "Version has not changed. No release will be created." - exit 1 + exit 0 fi shell: bash From 3cdeecc0fc46e66124dfed35934ba0bad4d451e6 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:34:54 +0200 Subject: [PATCH 02/18] Exit with error if conditions fail in release workflow Updated the release workflow to exit with status 1 instead of 0 when a version tag already exists or the version hasn't changed. This adjustment ensures the workflow stops for these error conditions, preventing unintended behavior or false success indications. Added `continue-on-error: true` to allow subsequent steps despite these non-critical errors. --- .github/workflows/CreateRelease.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 89acd11..65eb421 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -57,15 +57,16 @@ jobs: # Check if the version already exists as a tag if git rev-parse "refs/tags/${{ env.VERSION }}" >/dev/null 2>&1; then echo "Version ${{ env.VERSION }} already exists as a tag. No release will be created." - exit 0 + exit 1 fi # Compare current version with previous tag if [ "${{ env.VERSION }}" == "${{ env.PREVIOUS_TAG }}" ]; then echo "Version has not changed. No release will be created." - exit 0 + exit 1 fi shell: bash + continue-on-error: true - name: Generate release notes id: generate_notes From a25953ffc24b2e68f4058bbdaa76c911df56908e Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:38:38 +0200 Subject: [PATCH 03/18] Prevent redundant releases in GitHub Actions Added conditional logic to skip unnecessary release steps if the version tag already exists or if the version hasn't changed. This optimization avoids redundant operations by ensuring release-related jobs are executed only when needed, thus enhancing workflow efficiency. --- .github/workflows/CreateRelease.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 65eb421..c622f4f 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -57,19 +57,22 @@ jobs: # Check if the version already exists as a tag if git rev-parse "refs/tags/${{ env.VERSION }}" >/dev/null 2>&1; then echo "Version ${{ env.VERSION }} already exists as a tag. No release will be created." - exit 1 + echo "::set-output name=skip_release::true" + exit 0 fi # Compare current version with previous tag if [ "${{ env.VERSION }}" == "${{ env.PREVIOUS_TAG }}" ]; then echo "Version has not changed. No release will be created." - exit 1 + echo "::set-output name=skip_release::true" + exit 0 fi + echo "::set-output name=skip_release::false" shell: bash - continue-on-error: true - name: Generate release notes id: generate_notes + if: steps.check_version.outputs.skip_release == 'false' run: | echo "Generating release notes from ${{ env.PREVIOUS_TAG }} to HEAD..." repo_url=$(git config --get remote.origin.url) @@ -81,6 +84,7 @@ jobs: shell: bash - name: Set Git user + if: steps.check_version.outputs.skip_release == 'false' run: | git config --local user.name "GitHub Actions" git config --local user.email "actions@github.com" @@ -88,6 +92,7 @@ jobs: - 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 @@ -98,6 +103,7 @@ jobs: - name: Create and push tag id: create_tag + if: steps.check_version.outputs.skip_release == 'false' run: | git tag ${{ env.VERSION }} git push origin ${{ env.VERSION }} @@ -106,6 +112,7 @@ jobs: shell: bash - name: Release + if: steps.check_version.outputs.skip_release == 'false' uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.VERSION }} From c240083cf0630849b4d0e529750f6e22d3ddddb6 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:41:20 +0200 Subject: [PATCH 04/18] Switch to modern `GITHUB_OUTPUT` syntax in CI release workflow Updated the CreateRelease workflow to replace deprecated "::set-output" commands with the newer "$GITHUB_OUTPUT" syntax. This ensures compatibility with the latest GitHub Actions practices and enhances readability of the workflow script. --- .github/workflows/CreateRelease.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index c622f4f..4db6056 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -56,18 +56,18 @@ jobs: run: | # Check if the version already exists as a tag if git rev-parse "refs/tags/${{ env.VERSION }}" >/dev/null 2>&1; then + echo "skip_release=true" >> $GITHUB_OUTPUT echo "Version ${{ env.VERSION }} already exists as a tag. No release will be created." - echo "::set-output name=skip_release::true" exit 0 fi # Compare current version with previous tag if [ "${{ env.VERSION }}" == "${{ env.PREVIOUS_TAG }}" ]; then + echo "skip_release=true" >> $GITHUB_OUTPUT echo "Version has not changed. No release will be created." - echo "::set-output name=skip_release::true" exit 0 fi - echo "::set-output name=skip_release::false" + echo "skip_release=false" >> $GITHUB_OUTPUT shell: bash - name: Generate release notes From 6581ef6058eff9a7536a18c7c783319022759aaf Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:51:54 +0200 Subject: [PATCH 05/18] Enhance release branch handling Streamlined the branch checkout process by switching to `release --no-checkout` and added the push operation to the release branch. This improves the workflow efficiency and ensures the release branch is updated consistently. --- .github/workflows/CreateRelease.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 4db6056..3d64bae 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,11 +94,12 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - git checkout --orphan release/v${{ env.VERSION }} + git checkout release --no-checkout 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 }}" + git push origin release shell: bash - name: Create and push tag From 9caf12c61dcb24388bc0e0ff1a5e95478edd0ffa Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:54:31 +0200 Subject: [PATCH 06/18] Enhance release branch update process Refined workflow to ensure smoother updates to the release branch. Added steps to stash and apply local changes to prevent conflicts. Provided specific commands to checkout and update the release branch correctly. This approach maintains the branch's integrity and ensures all modifications are properly committed and pushed. --- .github/workflows/CreateRelease.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 3d64bae..3fe13da 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,11 +94,22 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - git checkout release --no-checkout - git reset - rm -f .gitignore + # Stash current changes (optional, only if you have unstaged changes you want to keep) + git stash + + # Checkout the release branch + git checkout release + + # Apply stashed changes (if you stashed earlier) + git stash pop || true + + # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json + + # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" + + # Push the changes to the release branch git push origin release shell: bash From 49490f2647ceef21ed43416c8dfd6bfb1f00bb2f Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:57:58 +0200 Subject: [PATCH 07/18] Simplify release branch checkout process Removed unnecessary git stash operations during release branch checkout. This streamlines the workflow by only focusing on switching to the release branch and adding the required files, which reduces potential complications and speeds up the release preparation process. --- .github/workflows/CreateRelease.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 3fe13da..9ddbf03 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,15 +94,9 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - # Stash current changes (optional, only if you have unstaged changes you want to keep) - git stash - # Checkout the release branch git checkout release - # Apply stashed changes (if you stashed earlier) - git stash pop || true - # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json From 372244d5c42aa779d181fe7c8c597a2c190483e9 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:59:52 +0200 Subject: [PATCH 08/18] Add GitHub token for secure push in release workflow Configured the GitHub Actions workflow to include the GITHUB_TOKEN environment variable during the release process. This ensures secure authentication when pushing changes to the release branch. Additionally, reordered the checkout and commit commands for better sequencing. --- .github/workflows/CreateRelease.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 9ddbf03..94f295d 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,17 +94,19 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - # Checkout the release branch - git checkout release - # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" + # Checkout the release branch + git checkout release + # Push the changes to the release branch git push origin release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash - name: Create and push tag From ccf24b511f7183c8a6e0dd662b093fd8a03d3e96 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:01:15 +0200 Subject: [PATCH 09/18] Remove .gitignore before creating temp branch Added step to delete .gitignore before staging new and modified files in the CreateRelease workflow. Ensures .gitignore does not interfere with the release processes and file staging operations. --- .github/workflows/CreateRelease.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 94f295d..db62f27 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,6 +94,8 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | + rm -rf .gitignore + # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json From ec4dfb020b8fa8fdef86e6604743aca739a585ca Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:02:49 +0200 Subject: [PATCH 10/18] Remove package-lock.json in release workflow Updated the release workflow to also remove package-lock.json when creating a temporary branch. This ensures that any changes to dependencies are not carried over inadvertently during the release process. --- .github/workflows/CreateRelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index db62f27..ae3afc1 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,7 +94,7 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - rm -rf .gitignore + rm -rf .gitignore package-lock.json # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json From f77e2be99aa24965f66a12e0679910c1667e709f Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:06:52 +0200 Subject: [PATCH 11/18] Move checkout and cleanup steps in release workflow Reordered steps in the release workflow to checkout the release branch and remove unwanted files before staging changes. This change ensures that the files removed reflect the current state of the release branch, avoiding potential inconsistencies during the release process. --- .github/workflows/CreateRelease.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index ae3afc1..50fe830 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,6 +94,10 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | + # Checkout the release branch + git checkout release + + # Remove unwanted files rm -rf .gitignore package-lock.json # Add new/modified files @@ -102,9 +106,6 @@ jobs: # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" - # Checkout the release branch - git checkout release - # Push the changes to the release branch git push origin release env: From aeff933b47eec002ffc1999a1fe30cc1239fb1f2 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:07:54 +0200 Subject: [PATCH 12/18] Reorder Git commands for cleanup Reordered the Git checkout command to occur after removing the unwanted files. This ensures that the cleanup operations are performed on the correct branch and reflect in the release process accurately. --- .github/workflows/CreateRelease.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 50fe830..bee0f25 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,12 +94,12 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - # Checkout the release branch - git checkout release - # Remove unwanted files rm -rf .gitignore package-lock.json + # Checkout the release branch + git checkout release + # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json From a2638420e8baf2540bd7f2aef1892951ec27f785 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:10:05 +0200 Subject: [PATCH 13/18] Create temp branch to handle release changes Introduced a temporary branch for release preparation steps before merging into the release branch. This isolates changes such as file removals and modifications until all updates are ready, improving workflow clarity and reducing risk of conflicts. After merging, the temp branch is deleted to keep the repository clean. --- .github/workflows/CreateRelease.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index bee0f25..3877ca0 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,20 +94,29 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | + # Create a temporary branch to commit the changes + git checkout -b temp-release-branch + # Remove unwanted files rm -rf .gitignore package-lock.json - # Checkout the release branch - git checkout release - # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" + # Checkout the release branch + git checkout release + + # Merge the changes from the temporary branch into the release branch + git merge --no-ff temp-release-branch + # Push the changes to the release branch git push origin release + + # Delete the temporary branch + git branch -d temp-release-branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash From a4792833be32bbbca09eb4ce0b9bbd763bb6f452 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:12:34 +0200 Subject: [PATCH 14/18] Optimize release workflow: remove temp branch steps Simplified the workflow by eliminating the creation and usage of a temporary branch for releasing. Changes are now directly committed and pushed to the release branch, streamlining the process and reducing complexity. --- .github/workflows/CreateRelease.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 3877ca0..fbb9fc0 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,29 +94,12 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - # Create a temporary branch to commit the changes - git checkout -b temp-release-branch - - # Remove unwanted files - rm -rf .gitignore package-lock.json - - # Add new/modified files - git add README.md package.json LICENSE dist/ src/ tsconfig.json - - # Commit the changes - git commit -m "Prepare files for release ${{ env.VERSION }}" - - # Checkout the release branch git checkout release - - # Merge the changes from the temporary branch into the release branch - git merge --no-ff temp-release-branch - - # Push the changes to the release branch + 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 }}" git push origin release - - # Delete the temporary branch - git branch -d temp-release-branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash From b0654b9ca94df73a41166ccc9827e436b4e7a006 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:17:11 +0200 Subject: [PATCH 15/18] Refactor release workflow to ensure a clean branch Updated the release workflow to prepare a clean release branch by copying necessary files to a temporary directory and then resetting the branch to avoid residue from previous commits. This ensures only the relevant files are included in the release, enhancing the integrity and clarity of the release branch. --- .github/workflows/CreateRelease.yml | 33 +++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index fbb9fc0..5539a19 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -90,16 +90,37 @@ jobs: git config --local user.email "actions@github.com" shell: bash - - name: Create temporary branch - id: create_temp_branch + - name: Create release commit in the release branch + id: create_release_commit if: steps.check_version.outputs.skip_release == 'false' run: | - git checkout release - git reset - rm -f .gitignore + # Create a temporary directory to save the files + temp_dir=$(mktemp -d) + + # Copy the files to the temporary directory + cp -R README.md package.json LICENSE dist/ src/ tsconfig.json $temp_dir/ + + # Checkout the release branch (or create it if it doesn't exist) + git fetch origin + git checkout -b release origin/release || git checkout --orphan release + + # Remove all files from the working directory + git rm -rf . + + # Move the files back from the temporary directory + cp -R $temp_dir/* . + + # Clean up the temporary directory + rm -rf $temp_dir + + # Add the files to the release branch git add README.md package.json LICENSE dist/ src/ tsconfig.json + + # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" - git push origin release + + # Push the changes to the release branch + git push -u origin release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash From 27fa7927e812f5eababaa13f5f83be4282f40480 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:22:20 +0200 Subject: [PATCH 16/18] Bump version to 0.0.12 Updated the version in package.json from 0.0.11 to 0.0.12 to reflect the latest changes and improvements. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 53e7338..3af0761 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-injex", - "version": "0.0.11", + "version": "0.0.12", "description": "Simple boilerplate code free dependency injection system for TypeScript.", "type": "module", "main": "./dist/index.js", From 7eba587119e20d587bb9d4ea4ef914944f6f91fe Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:26:13 +0200 Subject: [PATCH 17/18] ... --- .github/workflows/CreateRelease.yml | 34 +++++------------------------ package.json | 2 +- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 5539a19..4db6056 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -90,39 +90,15 @@ jobs: git config --local user.email "actions@github.com" shell: bash - - name: Create release commit in the release branch - id: create_release_commit + - name: Create temporary branch + id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - # Create a temporary directory to save the files - temp_dir=$(mktemp -d) - - # Copy the files to the temporary directory - cp -R README.md package.json LICENSE dist/ src/ tsconfig.json $temp_dir/ - - # Checkout the release branch (or create it if it doesn't exist) - git fetch origin - git checkout -b release origin/release || git checkout --orphan release - - # Remove all files from the working directory - git rm -rf . - - # Move the files back from the temporary directory - cp -R $temp_dir/* . - - # Clean up the temporary directory - rm -rf $temp_dir - - # Add the files to the release branch + git checkout --orphan release/v${{ env.VERSION }} + git reset + rm -f .gitignore git add README.md package.json LICENSE dist/ src/ tsconfig.json - - # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" - - # Push the changes to the release branch - git push -u origin release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash - name: Create and push tag diff --git a/package.json b/package.json index 3af0761..8e4c9c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-injex", - "version": "0.0.12", + "version": "0.0.10", "description": "Simple boilerplate code free dependency injection system for TypeScript.", "type": "module", "main": "./dist/index.js", From 48421408872de37e3f85009465aa6bc2b6e231cf Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:34:01 +0200 Subject: [PATCH 18/18] ... --- .github/workflows/CreateRelease.yml | 20 ++++++++++---------- package.json | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 4db6056..9e62a72 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -90,16 +90,16 @@ 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 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 diff --git a/package.json b/package.json index 8e4c9c5..55ee01d 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "ts-injex", - "version": "0.0.10", + "version": "0.0.11", "description": "Simple boilerplate code free dependency injection system for TypeScript.", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { + "prepare": "npm run build", "build": "npm run build:tsc", "build:tsc": "tsc", "lint": "eslint --ext .ts .",