From 69fbaade3a54ba8ccc068e46dc205afec39c8ccb Mon Sep 17 00:00:00 2001 From: Alex Balatsky Date: Tue, 19 Nov 2024 22:58:50 +0300 Subject: [PATCH] ci: build and release --- .github/workflows/build-release.yaml | 36 ++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-release.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 0000000..59b9d5a --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,36 @@ +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",