diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 0000000..a720326 --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,38 @@ +name: Build and release + +on: + push: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + registry-url: 'https://registry.npmjs.org' + - run: corepack enable + - run: pnpm install --frozen-lockfile + - run: pnpm build + + - id: changelog + uses: TriPSs/conventional-changelog-action@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + output-file: "false" + + - uses: actions/create-release@v1 + if: ${{ steps.changelog.outputs.skipped == 'false' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.changelog.outputs.tag }} + release_name: ${{ steps.changelog.outputs.tag }} + body: ${{ steps.changelog.outputs.clean_changelog }} + + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 1c72dec..c825f1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nxmad/medusa-telegram", - "version": "1.0.0", + "version": "0.1.0", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts",