Skip to content

Commit

Permalink
Merge pull request #12 from tolgee/jancizmar/prepare-for-release
Browse files Browse the repository at this point in the history
The initial version
  • Loading branch information
JanCizmar authored Nov 11, 2024
2 parents f7055f9 + c174335 commit 2ecc16f
Show file tree
Hide file tree
Showing 64 changed files with 16,504 additions and 1,541 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce Unix newlines
* text=auto eol=lf
34 changes: 34 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pre-release
on:
push:
branches: [ next, prerelease ]

jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: cache-node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci

# We need to get ready for this first!
# - name: Build the CLI
# run: npm run build
# - name: Run npm release
# run: npm run release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# GIT_AUTHOR_NAME: Tolgee Machine
# GIT_AUTHOR_EMAIL: [email protected]
# GIT_COMMITTER_NAME: Tolgee Machine
# GIT_COMMITTER_EMAIL: [email protected]
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release
on:
workflow_run:
workflows: [ Test ]
branches: [ main ]
types:
- completed

jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: cache-node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm ci

- name: Build the CLI
run: npm run build

# - name: Run npm release
# run: npm run release -- -d
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# GIT_AUTHOR_NAME: Tolgee Machine
# GIT_AUTHOR_EMAIL: [email protected]
# GIT_COMMITTER_NAME: Tolgee Machine
# GIT_COMMITTER_EMAIL: [email protected]
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
run: npm ci

- name: Run Tests
run: npm run test
run: npm run test:unit
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ allKeys.json
# Ignore macOS system files
.DS_Store

# Ignore npm package lock file (optional)
package-lock.json

# Ignore IDE and editor config files
.idea/
.vscode/
.vscode/launch.json
*.swp

# Ignore compiled TypeScript files
*.js
*.d.ts
/dist
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"singleQuote": true
}
39 changes: 39 additions & 0 deletions .vscode/launch.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Migrate",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/src/cli.ts",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/tsx",
"args": [
"migrate",
"-p",
"src/**/*.tsx",
"-k",
"<your open api API key>"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"cwd": "<migration project dir>",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"]
},
{
"name": "Upload keys",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/src/cli.ts",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/tsx",
"args": [
"upload-keys",
"-ak",
"<your tolgee API key>"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"cwd": "<migration project dir>",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"]
}
]
}
Loading

0 comments on commit 2ecc16f

Please sign in to comment.