Skip to content

Commit

Permalink
Merge pull request #39 from radiovisual/minor-doc-updates
Browse files Browse the repository at this point in the history
ci: fix publishing latest dist-tag for pre-releases
  • Loading branch information
radiovisual authored Oct 20, 2024
2 parents 78903ec + 8a45f6b commit 84ab73b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 35 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 84ab73b

Please sign in to comment.