Skip to content

Commit

Permalink
ci: setup release (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic authored Dec 8, 2024
1 parent 3a77195 commit 4163f69
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 65 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,43 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: navikt/github-app-token-generator@v1
id: get-token
with:
private-key: ${{ secrets.APP_PRIVATE_KEY }}
app-id: ${{ secrets.APP_ID }}
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 20
- name: Setup Node.js 22
uses: actions/setup-node@v3
with:
node-version: 20
node-version: 22

- uses: pnpm/action-setup@v4

- name: Install Dependencies
run: pnpm install

- name: Create Release Pull Request
- name: Build Packages
run: pnpm build

- name: publint
run: pnpm lint:publint

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm changeset version
publish: pnpm run publish
commit: "ci: release"
title: "ci: release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
123 changes: 62 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
{
"name": "cdn-cache-control",
"version": "1.2.0",
"description": "Easy, opinionated CDN cache header handling",
"homepage": "https://github.com/ascorbic/cdn-cache-control",
"repository": "ascorbic/cdn-cache-control",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"files": [
"dist",
"src"
],
"exports": {
".": {
"deno": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
}
},
"tsup": {
"entry": [
"src/index.ts"
],
"splitting": false,
"sourcemap": true,
"clean": true,
"dts": true,
"format": [
"esm",
"cjs"
]
},
"scripts": {
"build": "tsup",
"lint:types": "attw --pack .",
"lint:package": "publint",
"lint:prettier": "prettier --check src",
"lint": "pnpm run '/^lint:.*/'",
"test": "pnpm build && node --test",
"tsdoc": "tsdoc --src=src/index.ts && prettier --write README.md"
},
"keywords": [],
"author": "Matt Kane <m@mk.gg>",
"license": "MIT",
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@changesets/cli": "^2.27.7",
"@types/node": "^20.14.2",
"prettier": "^3.3.1",
"publint": "^0.2.8",
"tsdoc-markdown": "^0.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"packageManager": "pnpm@8.14.0+sha1.bb42032ff80dba5f9245bc1b03470d2fa0b7fb2f"
"name": "cdn-cache-control",
"version": "1.2.0",
"description": "Easy, opinionated CDN cache header handling",
"homepage": "https://github.com/ascorbic/cdn-cache-control",
"repository": "ascorbic/cdn-cache-control",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"files": [
"dist",
"src"
],
"exports": {
".": {
"deno": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
}
},
"tsup": {
"entry": [
"src/index.ts"
],
"splitting": false,
"sourcemap": true,
"clean": true,
"dts": true,
"format": [
"esm",
"cjs"
]
},
"scripts": {
"build": "tsup",
"lint:types": "attw --pack .",
"lint:package": "publint",
"lint:prettier": "prettier --check src",
"publish": "changeset publish && npx jsr publish",
"lint": "pnpm run '/^lint:.*/'",
"test": "pnpm build && node --test",
"tsdoc": "tsdoc --src=src/index.ts && prettier --write README.md"
},
"keywords": [],
"author": "Matt Kane <m@mk.gg>",
"license": "MIT",
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@changesets/cli": "^2.27.7",
"@types/node": "^20.14.2",
"prettier": "^3.3.1",
"publint": "^0.2.8",
"tsdoc-markdown": "^0.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"packageManager": "pnpm@8.14.0+sha1.bb42032ff80dba5f9245bc1b03470d2fa0b7fb2f"
}

0 comments on commit 4163f69

Please sign in to comment.