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