Skip to content

Commit 695664d

Browse files
committed
Fix permission for deployments
1 parent 321027f commit 695664d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- "v*"
77

8+
permissions:
9+
contents: write
10+
packages: write
11+
812
jobs:
913
validate-and-release:
1014
runs-on: windows-latest
@@ -80,3 +84,5 @@ jobs:
8084

8185
- name: Cargo Publish
8286
run: cargo publish
87+
env:
88+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/release-tag.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- main
99

10+
permissions:
11+
contents: write # Ajout de cette ligne pour autoriser la création de tags
12+
1013
jobs:
1114
create-tag:
1215
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') }}
@@ -17,6 +20,8 @@ jobs:
1720
steps:
1821
- name: Checkout Repository
1922
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2025

2126
- name: Extract Version from Branch Name
2227
id: extract_version
@@ -34,6 +39,8 @@ jobs:
3439
git config user.email "actions@github.com"
3540
git tag "v${{ env.version }}" -a -m "Release version ${{ env.version }}"
3641
git push origin "v${{ env.version }}"
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3744

3845
- name: Verify Tag
3946
run: |

0 commit comments

Comments
 (0)