From 992c05971496fa281c38d8dcd1d149e18ec51a61 Mon Sep 17 00:00:00 2001 From: JD Solanki Date: Sat, 15 Jul 2023 01:51:02 +0530 Subject: [PATCH] ci: release CI added --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c530e66 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + + - run: npx changelogithub # or changelogithub@0.12 if ensure the stable result + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/package.json b/package.json index f79754a..0ef9421 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Converts markdown files to HTML", "main": "index.js", "scripts": { - "release": "bumpp package.json", + "release": "npm run build && bumpp package.json", "test": "echo \"Error: no test specified\" && exit 1", "build": "ncc build index.js --license licenses.txt" }, @@ -30,4 +30,4 @@ "@actions/core": "^1.6.0", "markdown-it": "^13.0.1" } -} +} \ No newline at end of file