Skip to content

Commit

Permalink
ci(repo): Fix permissions on Github actions for release
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Jan 24, 2025
1 parent 4918803 commit dd21865
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ jobs:

release:
name: Create Release with Knope
environment: npm-deploy
if: >-
(github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
Expand All @@ -373,7 +372,7 @@ jobs:
- build
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
actions: write
steps:
- name: Checkout Repository
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ env:
RUST_VERSION: 1.81.0
RUST_NIGHTLY_VERSION: nightly-2024-11-06

permissions:
contents: write
pull-requests: write

jobs:
setup:
if: "!startsWith(github.event.head_commit.message, 'ci(release)')"
Expand All @@ -33,7 +37,6 @@ jobs:
echo "branch=changeset/release-main" >> $GITHUB_OUTPUT
prepare-release:
environment: npm-deploy
if: "!startsWith(github.event.head_commit.message, 'ci(release)')"
needs: setup
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
publish-crates:
name: Publish on Crates.io
runs-on: ubuntu-latest
environment: npm-deploy
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit dd21865

Please sign in to comment.