Skip to content

Commit c652394

Browse files
committed
Add package write permissions
1 parent a13e952 commit c652394

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v2
18+
1819
- name: Build
1920
run: dotnet build --configuration Release
21+
2022
- name: Test
2123
run: dotnet test --configuration Release --no-build

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
tags:
44
- "v[0-9]+.[0-9]+.[0-9]+"
55
jobs:
6+
permissions:
7+
packages: write
68
build:
79
runs-on: ubuntu-latest
810
timeout-minutes: 15
@@ -12,18 +14,24 @@ jobs:
1214
steps:
1315
- name: Checkout
1416
uses: actions/checkout@v2
17+
1518
- name: Verify commit exists in origin/master
1619
run: |
1720
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
1821
git branch --remote --contains | grep origin/master
22+
1923
- name: Set VERSION variable from tag
2024
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
25+
2126
- name: Build
2227
run: dotnet build --configuration Release /p:Version=${VERSION}
28+
2329
- name: Test
2430
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
31+
2532
- name: Pack
2633
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
34+
2735
- name: Push
2836
run: dotnet nuget push EntityFramework.Extensions.AddQueryFilter.${VERSION}.nupkg --source https://nuget.pkg.github.com/HerveZu/index.json --api-key ${GITHUB_TOKEN}
2937
env:

0 commit comments

Comments
 (0)