Skip to content

Commit

Permalink
feat: use provenance and tags for publishing (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j authored Sep 7, 2024
1 parent 8e18aae commit 1740630
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@ jobs:
publish-npm:
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: npm ci
- name: Publish
run: npm publish
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.ref_name }}
- run: npm publish --provenance --access public --tag next
if: "github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- run: npm publish --provenance --access public
if: "!github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-lit",
"version": "1.14.0",
"version": "0.0.0-dev",
"description": "lit-html support for ESLint",
"main": "lib/index.js",
"files": [
Expand Down

0 comments on commit 1740630

Please sign in to comment.