Skip to content

Commit

Permalink
ENG-16757/publishing automation (#33)
Browse files Browse the repository at this point in the history
* Updating version to 0.6.5, adding publishing automation

* Fixing workflow step name

* Fixing workflow step name

* Fixing workflow dependencies

* Adding repo to package.json

* Normalizing repo url, removing deprecated step from workflow

* Fixing workflow call

* Removing .env file
  • Loading branch information
nicholas-chiu authored Oct 18, 2024
1 parent f870c76 commit 42f45ce
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Package to npmjs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '20.10.0'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

github-release:
name: >-
Upload to Github Release
needs:
- build-and-publish
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "lilt-node",
"version": "0.6.3",
"version": "0.6.5",
"repository": {
"type": "git",
"url": "git+https://github.com/lilt/lilt-node.git"
},
"description": "The_Lilt_REST_API_enables_programmatic_access_to_the_full_range_of_Lilt_backend_services_including___Training_of_and_translating_with_interactive_adaptive_machine_translation___Large_scale_translation_memory___The_Lexicon__a_large_scale_termbase___Programmatic_control_of_the_Lilt_CAT_environment___Translation_memory_synchronizationRequests_and_responses_are_in_JSON_format__The_REST_API_only_responds_to_HTTPS___SSL_requests__AuthenticationRequests_are_authenticated_via_REST_API_key_which_requires_the_Business_plan_Requests_are_authenticated_using__HTTP_Basic_Auth_https__en_wikipedia_org_wiki_Basic_access_authentication__Add_your_REST_API_key_as_both_the_username_and_password_For_development_you_may_also_pass_the_REST_API_key_via_the_key_query_parameter__This_is_less_secure_than_HTTP_Basic_Auth_and_is_not_recommended_for_production_use__QuotasOur_services_have_a_general_quota_of_4000_requests_per_minute__Should_you_hit_the_maximum_requests_per_minute_you_will_need_to_wait_60_seconds_before_you_can_send_another_request_",
"license": "Unlicense",
"main": "dist/index.js",
Expand Down

0 comments on commit 42f45ce

Please sign in to comment.