Skip to content

Commit 5c6cd02

Browse files
authored
Merge pull request #13 from kWeglinski/develop
release 0.11.0
2 parents 206165b + 25b0c9e commit 5c6cd02

File tree

12 files changed

+1017
-742
lines changed

12 files changed

+1017
-742
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Docker CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v3
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Extract version from package.json
22+
id: extract_version
23+
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v3
27+
with:
28+
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
password: ${{ secrets.DOCKERHUB_TOKEN }}
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@v6
33+
with:
34+
push: true
35+
tags: |
36+
kweg/omnipoly:${{ steps.extract_version.outputs.version }}
37+
kweg/omnipoly:latest
38+
39+
- name: Extract changelog for the version
40+
id: extract_changelog
41+
run: |
42+
VERSION=${{ steps.extract_version.outputs.version }}
43+
CHANGELOG=$(grep -A 10 "### $VERSION" changelog.md | tail -n +2)
44+
echo "::set-output name=changelog::$CHANGELOG"
45+
46+
- name: Create GitHub Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
tag_name: v${{ steps.extract_version.outputs.version }}
53+
release_name: Release v${{ steps.extract_version.outputs.version }}
54+
body: |
55+
### Changelog
56+
57+
${{ steps.extract_changelog.outputs.changelog }}
58+
59+
### Build Results
60+
${{ steps.build_push.outputs.digest }}
61+
draft: false
62+
prerelease: false
63+
64+
- name: Create GitHub Tag
65+
run: |
66+
git config --global user.name 'github-actions[bot]'
67+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
68+
git tag v${{ steps.extract_version.outputs.version }}
69+
git push origin v${{ steps.extract_version.outputs.version }}

.github/workflows/docker-image.yml renamed to .github/workflows/nightly-docker-image.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Docker CI
33
on:
44
push:
55
branches:
6-
- "main"
6+
- "develop"
77

88
jobs:
99
docker:
@@ -18,10 +18,6 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@v2
2020

21-
- name: Extract version from package.json
22-
id: extract_version
23-
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
24-
2521
- name: Login to Docker Hub
2622
uses: docker/login-action@v3
2723
with:
@@ -33,5 +29,4 @@ jobs:
3329
with:
3430
push: true
3531
tags: |
36-
kweg/omnipoly:${{ steps.extract_version.outputs.version }}
37-
kweg/omnipoly:latest
32+
kweg/omnipoly:nightly

.github/workflows/test-pr.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Docker CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "develop"
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v3
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build project
30+
run: npm run build
31+
32+
- name: Run tests
33+
run: npm run test

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Latest Features:
22

3+
- Added ability to upload files for translation
4+
- Added ability to download translations
35
- Added clear button to clear text boxes
46
- Added auto full display alternative for shorter translations
57
- Added option to add words to dictionary for grammar checks
@@ -94,11 +96,16 @@ services:
9496
- ~/ngramsDir:/ngrams
9597
```
9698

99+
# Running and building locally
100+
101+
- Copy `.env.sample` as `.env`
102+
- Fill in all fields and add `DEV=true`
103+
- `npm i`
104+
- `npm run dev`
105+
- voila! the app should be served at localhost:80
97106

98107
# Roadmap:
99108

100-
- 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.
101-
- Clear text area
102109
- 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.
103110
- ability to switch between translated text and input text in language tool
104111
- AI tab to prompt AI to modify the input/translated text

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
### 0.11.0
2+
3+
- chore: Added nightly builds on develop branch
4+
- secops: dependabot - bump vite to 6 (resolves 6 dependabot warnings)
5+
- chore: Github actions updated to create github release and tags
6+
- chore: added PR validation GH action
7+
- feature: file upload
8+
- feature: download translation as a file
9+
- feature: tooltips all around
10+
111
### 0.10.4
212

313
- fix: z-index

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const handleFormDataPost = (url, req, res, filter) => {
108108
res.send(filter ? filter(data) : data);
109109
})
110110
.catch((error) => {
111-
console.log({ error, url });
111+
console.log({ error: error.message, url });
112112
res.send(error);
113113
});
114114
};

0 commit comments

Comments
 (0)