Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
seofernando25 committed May 13, 2024
1 parent 9a46fa9 commit 9e6a30c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install && npm run build

publish-npm:
build-and-publish:
needs: build
runs-on: ubuntu-latest
steps:
Expand All @@ -25,7 +16,31 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm install && npm run build

- name: Install dependencies
run: npm install

- name: Build
run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

create-tag:
needs: build-and-publish
runs-on: ubuntu-latest

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

- name: Setup Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Create Tag
run: |
VERSION=$(node -p "require('./package.json').version")
git tag v$VERSION
git push origin v$VERSION
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i18n-openai-translate",
"version": "0.0.5",
"version": "0.0.6",
"description": "Translate your i18n JSON files into multiple languages using GPT",
"repository": {
"type": "git",
Expand Down

0 comments on commit 9e6a30c

Please sign in to comment.