Skip to content

ci: update permissions; remove credentials #1359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
name: Lint
steps:
- uses: pnpm/action-setup@v4
Expand All @@ -10,16 +12,20 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: setup node.js
uses: actions/setup-node@v4
with:
check-latest: true
node-version: '20'
- run: pnpm install
- run: pnpm build
- run: pnpm lint
timeout-minutes: 10
test:
runs-on: ubuntu-latest
permissions:
contents: read
name: Test (Node.js ${{ matrix.node_js_version }})
steps:
- uses: pnpm/action-setup@v4
Expand All @@ -29,9 +35,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: setup node.js
uses: actions/setup-node@v4
with:
check-latest: true
node-version: '${{ matrix.node_js_version }}'
- run: pnpm install
- run: pnpm test
Expand All @@ -45,6 +53,8 @@ jobs:
- '22'
build:
runs-on: ubuntu-latest
permissions:
contents: read
name: Build
steps:
- uses: pnpm/action-setup@v4
Expand All @@ -54,14 +64,18 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: setup node.js
uses: actions/setup-node@v4
with:
check-latest: true
node-version: '20'
- run: pnpm install
- run: pnpm build
timeout-minutes: 10
name: Lint, test and build
permissions:
contents: read
on:
pull_request:
branches:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ jobs:
release:
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
name: Release
steps:
- uses: pnpm/action-setup@v4
Expand All @@ -11,9 +14,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: setup node.js
uses: actions/setup-node@v4
with:
check-latest: true
node-version: "20"
- run: pnpm install
- run: pnpm build
Expand All @@ -22,6 +27,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Build and release
permissions:
contents: read
on:
push:
branches:
Expand Down