Skip to content

Commit cb6a938

Browse files
committed
chore(release): sync changelog and release workflow updates
1 parent b935479 commit cb6a938

5 files changed

Lines changed: 60 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,21 @@ jobs:
6565
- name: Install dependencies
6666
run: bun install --frozen-lockfile
6767

68+
- name: Sync version from release tag
69+
run: |
70+
TAG="${{ github.event.release.tag_name }}"
71+
VERSION="${TAG#v}"
72+
73+
if ! echo "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.]+)?(\+[0-9A-Za-z.-]+)?$'; then
74+
echo "Invalid release tag: $TAG"
75+
echo "Expected semver tag like v1.2.3 or 1.2.3"
76+
exit 1
77+
fi
78+
79+
npm version "$VERSION" --no-git-tag-version --allow-same-version
80+
6881
- name: Build package
6982
run: bun run build
7083

7184
- name: Publish package
72-
run: npm publish --access public
85+
run: npm publish --access public
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: main
20+
21+
- name: Update Changelog
22+
uses: stefanzweifel/changelog-updater-action@v1
23+
with:
24+
latest-version: ${{ github.event.release.name }}
25+
release-notes: ${{ github.event.release.body }}
26+
27+
- name: Commit updated CHANGELOG
28+
uses: stefanzweifel/git-auto-commit-action@v7
29+
with:
30+
branch: main
31+
commit_message: Update CHANGELOG
32+
file_pattern: CHANGELOG.md

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on Keep a Changelog.
6+

src/runtime/composables/useFormForgeI18n.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ const TRANSLATIONS = {
9090
'builder.error.publish': 'Publish failed',
9191
'builder.error.unpublish': 'Unpublish failed',
9292
'builder.error.categoryCreate': 'Category creation failed',
93+
'builder.toast.saveSuccess': 'Form saved',
94+
'builder.toast.publishSuccess': 'Form published',
95+
'builder.toast.unpublishSuccess': 'Form unpublished',
9396
'builder.optionDefaultLabel': 'Option',
9497
'builder.optionsCount': '{count} options',
9598
'builder.categoryModal.title': 'Create category',
@@ -208,6 +211,9 @@ const TRANSLATIONS = {
208211
'builder.error.publish': 'Échec de la publication',
209212
'builder.error.unpublish': 'Échec de la dépublication',
210213
'builder.error.categoryCreate': 'Échec de la création de catégorie',
214+
'builder.toast.saveSuccess': 'Formulaire sauvegardé',
215+
'builder.toast.publishSuccess': 'Formulaire publié',
216+
'builder.toast.unpublishSuccess': 'Formulaire dépublié',
211217
'builder.optionDefaultLabel': 'Option',
212218
'builder.optionsCount': '{count} options',
213219
'builder.categoryModal.title': 'Créer une catégorie',

src/runtime/types/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export interface FormForgeSubmitInput {
7373
}
7474

7575
export interface FormForgeSubmissionResponse {
76-
data: FormForgeJsonObject
77-
meta?: FormForgeJsonObject
76+
data: Record<string, any>
77+
meta?: Record<string, any>
7878
}
7979

8080
export interface FormForgeResponsesListResponse {

0 commit comments

Comments
 (0)