diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9fc706a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Create and push release tag + +on: + push: + branches: + - main + +jobs: + create-and-push-release-tag: + runs-on: ubuntu-latest + + steps: + - name: 📥 Checkout repository + uses: actions/checkout@v4 + + - name: 🏷️ Extract version from package.json + id: extract_version + run: | + VERSION=$(node -p "require('./package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: 🏷️ Create and push Git tag + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git tag -a "v${{ steps.extract_version.outputs.version }}" -m "Release v${{ steps.extract_version.outputs.version }}" + git push origin "v${{ steps.extract_version.outputs.version }}" diff --git a/package-lock.json b/package-lock.json index 44fbf34..feb7153 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cli", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cli", - "version": "1.0.6", + "version": "1.0.7", "license": "Apache-2.0", "dependencies": { "@inquirer/prompts": "5.5.0", diff --git a/package.json b/package.json index d67350b..650abfd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cli", "description": "The cli is a robust command-line interface designed to streamline the development and management of Balancer’s infrastructure and internal operations.", "private": false, - "version": "1.0.6", + "version": "1.0.7", "type": "module", "main": "dist/index.js", "scripts": {