Skip to content

Commit

Permalink
ci: update release flow to npm
Browse files Browse the repository at this point in the history
on-behalf-of: @porscheofficial <[email protected]>
Signed-off-by: Patrick Böder <[email protected]>
  • Loading branch information
pboeder committed Nov 19, 2024
1 parent 8ad3de0 commit b90be07
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -20,16 +23,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Set up GitHub Packages auth
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc

- name: Configure Git user
run: |
git config --global user.name "github-actions[bot]"
Expand All @@ -39,7 +40,9 @@ jobs:
run: npm version ${{ github.event.inputs.version }} ${{ github.event.inputs.version }}

- name: Publish to GitHub Packages
run: npm publish --registry=https://npm.pkg.github.com
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Push Git Tag
run: git push --follow-tags
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install @porscheofficial/vercel-static-extensions
```json
{
"scripts": {
"postbuild": "@porscheofficial/vercel-static-extensions"
"postbuild": "vercel-static-extensions"
}
}
```
Expand Down
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"name": "@porscheofficial/vercel-static-extensions",
"version": "0.0.0",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
"description": "A plug-and-play solution to implement authentication through Entra ID for static sites hosted on Vercel.",
"version": "0.1.0",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/porscheofficial/vercel-static-extensions"
},
"scripts": {
"dev": "ts-node src/cli.ts",
"build": "node scripts/build.mjs"
},
"files": ["dist", "README.md", "LICENSE.md"],
"engines": {
"node": ">= 18"
},
"bin": {
"@porscheofficial/vercel-static-extensions": "dist/cli.js"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
Expand All @@ -17,16 +31,5 @@
"peerDependencies": {
"next-auth": ">5",
"esbuild": "0.24.0"
},
"scripts": {
"dev": "ts-node src/cli.ts",
"build": "node scripts/build.mjs"
},
"files": ["dist"],
"engines": {
"node": ">= 18"
},
"bin": {
"@porscheofficial/vercel-static-extensions": "dist/cli.js"
}
}

0 comments on commit b90be07

Please sign in to comment.