Skip to content

Commit

Permalink
Merge pull request #24 from Itheum/d-damian
Browse files Browse the repository at this point in the history
D damian
  • Loading branch information
damienen authored Apr 30, 2024
2 parents b56e4a8 + 75a7248 commit 9fa15ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: Publish

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Release
publish-npm:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v4
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: lts/*
node-version: '18.x'
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npx ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Lint
run: npm run lint:fix
- name: Test
run: npm run test --if-present
- name: Build
run: npm run build
- name: Release
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set access public && npx semantic-release
run: |
RELEASE_TAG=v$(node -p "require('./package.json').version")
gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG" --generate-notes
- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish --access=public
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itheum/sdk-mx-enterprise",
"version": "0.3.0-semantic-release",
"version": "0.3.0",
"description": "SDK for Itheum's Enterprise technology",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down

0 comments on commit 9fa15ec

Please sign in to comment.