Skip to content

Commit

Permalink
Add package permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Oct 14, 2024
1 parent b1cfa69 commit 270fe0c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ on:
- minor
- patch

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: read
packages: read

jobs:
bump-version:
name: Bump version
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: CI

on: [push]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: read
packages: read

jobs:
build:
name: Build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: ["main"]
workflow_dispatch:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: read
pages: write
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ on:
release:
types: [published]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: read
packages: write
id-token: write

jobs:
publish-gpr:
name: "Publish to GitHub Package Registry"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
Expand All @@ -30,9 +35,6 @@ jobs:
publish-npm:
name: "Publish to npm"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
Expand Down

0 comments on commit 270fe0c

Please sign in to comment.