Skip to content

Commit

Permalink
Merge pull request #13 from kWeglinski/develop
Browse files Browse the repository at this point in the history
release 0.11.0
  • Loading branch information
kWeglinski authored Feb 15, 2025
2 parents 206165b + 25b0c9e commit 5c6cd02
Show file tree
Hide file tree
Showing 12 changed files with 1,017 additions and 742 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Docker CI

on:
push:
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Checkout code
uses: actions/checkout@v2

- name: Extract version from package.json
id: extract_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: |
kweg/omnipoly:${{ steps.extract_version.outputs.version }}
kweg/omnipoly:latest
- name: Extract changelog for the version
id: extract_changelog
run: |
VERSION=${{ steps.extract_version.outputs.version }}
CHANGELOG=$(grep -A 10 "### $VERSION" changelog.md | tail -n +2)
echo "::set-output name=changelog::$CHANGELOG"
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.extract_version.outputs.version }}
release_name: Release v${{ steps.extract_version.outputs.version }}
body: |
### Changelog
${{ steps.extract_changelog.outputs.changelog }}
### Build Results
${{ steps.build_push.outputs.digest }}
draft: false
prerelease: false

- name: Create GitHub Tag
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git tag v${{ steps.extract_version.outputs.version }}
git push origin v${{ steps.extract_version.outputs.version }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker CI
on:
push:
branches:
- "main"
- "develop"

jobs:
docker:
Expand All @@ -18,10 +18,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Extract version from package.json
id: extract_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -33,5 +29,4 @@ jobs:
with:
push: true
tags: |
kweg/omnipoly:${{ steps.extract_version.outputs.version }}
kweg/omnipoly:latest
kweg/omnipoly:nightly
33 changes: 33 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker CI

on:
pull_request:
branches:
- "develop"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Run tests
run: npm run test
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Latest Features:

- Added ability to upload files for translation
- Added ability to download translations
- Added clear button to clear text boxes
- Added auto full display alternative for shorter translations
- Added option to add words to dictionary for grammar checks
Expand Down Expand Up @@ -94,11 +96,16 @@ services:
- ~/ngramsDir:/ngrams
```

# Running and building locally

- Copy `.env.sample` as `.env`
- Fill in all fields and add `DEV=true`
- `npm i`
- `npm run dev`
- voila! the app should be served at localhost:80

# Roadmap:

- Developer experience - This project was initially built for myself and has unexpectedly grown. I've already started migration to proper state management but some work is still needed there. Then I need to improve ability to run it during development (introduction of BFF has made the setup cumbersome where it shouldn't be). Once that is solved, I'll introduce releases and tags.
- Clear text area
- Text workflow - The goal is to have a feeling of single text input across all modules. So we can translate and adjust the same text.
- ability to switch between translated text and input text in language tool
- AI tab to prompt AI to modify the input/translated text
Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### 0.11.0

- chore: Added nightly builds on develop branch
- secops: dependabot - bump vite to 6 (resolves 6 dependabot warnings)
- chore: Github actions updated to create github release and tags
- chore: added PR validation GH action
- feature: file upload
- feature: download translation as a file
- feature: tooltips all around

### 0.10.4

- fix: z-index
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const handleFormDataPost = (url, req, res, filter) => {
res.send(filter ? filter(data) : data);
})
.catch((error) => {
console.log({ error, url });
console.log({ error: error.message, url });
res.send(error);
});
};
Expand Down
Loading

0 comments on commit 5c6cd02

Please sign in to comment.