This commit is contained in:
2024-08-16 18:26:13 +02:00
parent 27fa7927e8
commit 7eba587119
2 changed files with 6 additions and 30 deletions

View File

@@ -90,39 +90,15 @@ jobs:
git config --local user.email "actions@github.com" git config --local user.email "actions@github.com"
shell: bash shell: bash
- name: Create release commit in the release branch - name: Create temporary branch
id: create_release_commit id: create_temp_branch
if: steps.check_version.outputs.skip_release == 'false' if: steps.check_version.outputs.skip_release == 'false'
run: | run: |
# Create a temporary directory to save the files git checkout --orphan release/v${{ env.VERSION }}
temp_dir=$(mktemp -d) git reset
rm -f .gitignore
# 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 git add README.md package.json LICENSE dist/ src/ tsconfig.json
# Commit the changes
git commit -m "Prepare files for release ${{ env.VERSION }}" 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 shell: bash
- name: Create and push tag - name: Create and push tag

View File

@@ -1,6 +1,6 @@
{ {
"name": "ts-injex", "name": "ts-injex",
"version": "0.0.12", "version": "0.0.10",
"description": "Simple boilerplate code free dependency injection system for TypeScript.", "description": "Simple boilerplate code free dependency injection system for TypeScript.",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",