diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd4e3b3..7da10d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,29 +17,19 @@ jobs: - run: npm ci - name: Extract version from tag run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: Check for pre-release + id: check_pre_release + run: | + if [[ "${{ env.RELEASE_VERSION }}" == *-* ]]; then + echo "IS_PRE_RELEASE=true" >> $GITHUB_ENV + echo "RELEASE_TAG=next" >> $GITHUB_ENV + else + echo "IS_PRE_RELEASE=false" >> $GITHUB_ENV + echo "RELEASE_TAG=latest" >> $GITHUB_ENV + fi - run: npm version ${{ env.RELEASE_VERSION }} --no-git-tag-version - run: npm run build - - run: npm publish + - name: Publish to npm + run: npm publish --tag ${{ env.RELEASE_TAG }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Commit and push version bump - run: | - git checkout -b version-bump/${{ env.RELEASE_VERSION }} - git add package.json - git commit -m "chore: bump version to ${{ env.RELEASE_VERSION }}" - git push origin version-bump/${{ env.RELEASE_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # This step will only run if all previous steps have succeeded - - name: Create Pull Request for Version Bump - if: success() - uses: peter-evans/create-pull-request@v6 - with: - commit-message: Update package version to ${{ env.RELEASE_VERSION }} - title: "chore: update package version to ${{ env.RELEASE_VERSION }}" - body: "Updates `package.json` version to `${{ env.RELEASE_VERSION }}`." - branch: version-bump/${{ env.RELEASE_VERSION }} - labels: version-bump - token: ${{ secrets.GITHUB_TOKEN }} - base: main diff --git a/README.md b/README.md index 9b97511..c9587f5 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,17 @@ Furthermore, there are best practices we want to adhere to with our translated f Keeli will help you automatically discover many problems with your translation files, including: -✅ Finds untranslated messages -✅ Finds empty messages -✅ Finds missing variables -✅ Finds accidentally translated variables -✅ Finds variable syntax errors -✅ Finds missing keys -✅ Finds unknown/un-balanced keys -✅ Finds keys violating your naming convention -✅ Finds extra whitespace -✅ Finds HTML in messages -✅ _...and more!_ +- ✅ Finds untranslated messages +- ✅ Finds empty messages +- ✅ Finds missing variables +- ✅ Finds accidentally translated variables +- ✅ Finds variable syntax errors +- ✅ Finds missing keys +- ✅ Finds unknown/un-balanced keys +- ✅ Finds keys violating your naming convention +- ✅ Finds extra whitespace +- ✅ Finds HTML in messages +- ✅ _...and more!_ Most of these rules are configurable so you can customize keeli to your specific needs. @@ -236,7 +236,7 @@ If you have the repo cloned locally, you can test run the CLI by running: # Publishing -Create a GitHub release with the version number you want to create. Make sure the tag you create matches the version number (e.g., `v1.2.3`) and release! GitHub actions will take over and attempt to publish the package version you specified. Note that a Pull request will get opened on the repo automatically to bump the package version to align with the latest release. This PR should be merged ASAP after opened to keep things in sync. +Create a GitHub release with the version number you want to create. Make sure the tag you create matches the version number (e.g., `v1.2.3`) and release! GitHub actions will take over and attempt to publish the package version you specified. --- diff --git a/package.json b/package.json index a3cdc1a..90217c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keeli", - "version": "0.0.1", + "version": "0.0.0", "main": "dist/index.js", "description": "Configurable CLI validation tool to check for common problems in your translated source files.", "author": {