diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d1d0849 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,41 @@ +name: Release package + +on: + push: + tags: + - "v*.*.*" + +permissions: + id-token: write # Required for OIDC + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Use Node.js 22.x + uses: actions/setup-node@v6 + with: + node-version: 22.x + cache: 'npm' + + - run: npm version ${{ github.ref_name }} --no-git-tag-version + + - run: npm install + + - run: npm test + + - run: npm pack + + - run: npm publish + + - name: Release + if: ${{ always() }} + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: | + ./anchor-markdown-header-*.tgz diff --git a/package-lock.json b/package-lock.json index 458fb26..f6d29c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "anchor-markdown-header", - "version": "0.7.0", + "version": "0.0.0-development", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "anchor-markdown-header", - "version": "0.7.0", + "version": "0.0.0-development", "license": "MIT", "dependencies": { "emoji-regex": "~10.1.0", diff --git a/package.json b/package.json index f6db0c0..22335b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anchor-markdown-header", - "version": "0.7.0", + "version": "0.0.0-development", "description": "Generates an anchor for a markdown header.", "main": "anchor-markdown-header.js", "scripts": {