From fe98ecc894e97831e0d98929f0b605cdd00b0d9e Mon Sep 17 00:00:00 2001 From: Joshua Raphael Date: Thu, 4 Sep 2025 00:47:15 -0700 Subject: [PATCH] add release pipeline --- .github/workflows/release.yaml | 39 ++++++++++++++++++++++++++++++++++ package.json | 8 +++++-- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..7ef322f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + npm: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + github: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://npm.pkg.github.com' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 60e1000..1fc0036 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "highlightjs-rascript", - "version": "0.0.0", + "version": "0.0.1", "description": "highlight.js syntax definition for RATools DSL, RAScript", "main": "src/languages/rascript.js", "scripts": { @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/joshraphael/highlightjs-rascript.git" + "url": "https://github.com/joshraphael/highlightjs-rascript.git" }, "keywords": [ "rascript", @@ -17,6 +17,10 @@ "highlightjs", "syntax" ], + "files": [ + "dist", + "src" + ], "author": "Joshua Raphael", "license": "MIT", "bugs": {