Skip to content

Commit b66ea62

Browse files
update github workflows and nugets
1 parent b3c7cc3 commit b66ea62

File tree

11 files changed

+41
-14
lines changed

11 files changed

+41
-14
lines changed

.github/workflows/Format.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ on:
1414
- main
1515
- develop
1616

17+
permissions:
18+
contents: write
19+
1720
env:
18-
DOTNET_VERSION: '9.0.x'
19-
21+
DOTNET_VERSION: "9.0.x"
22+
2023
jobs:
2124
format:
2225
runs-on: ubuntu-latest

.github/workflows/Publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ env:
1414
BUILD_CONFIGURATION: ''
1515
VERSION_SUFFIX: ''
1616

17+
permissions:
18+
contents: write
19+
packages: write
20+
actions: read
21+
1722
jobs:
1823
build-publish:
1924
runs-on: ubuntu-latest
@@ -81,4 +86,4 @@ jobs:
8186
run: dotnet test --no-build --verbosity normal --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.SOLUTION_NAME }}
8287

8388
- name: Pack and Push
84-
run: dotnet pack --no-build --configuration ${{ env.BUILD_CONFIGURATION }} -p:PackageOutputPath=../../output --version-suffix "${{ env.VERSION_SUFFIX }}" -p:PackageSource='${{ env.NUGET_SOURCE }}' -p:PushAfterPack=true -p:PackageApiKey='${{ secrets.NUGET_API_KEY }}'
89+
run: dotnet pack --no-build --configuration ${{ env.BUILD_CONFIGURATION }} -p:PackageId=${{ env.PROJECT_NAME }} -p:PackageOutputPath=../../output --version-suffix "${{ env.VERSION_SUFFIX }}" -p:PackageSource='${{ env.NUGET_SOURCE }}' -p:PushAfterPack=true -p:PackageApiKey='${{ secrets.NUGET_API_KEY }}'

.github/workflows/Test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ on:
1414
- main
1515
- develop
1616

17+
permissions:
18+
contents: read
19+
actions: read
20+
1721
env:
1822
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1923
SOLUTION_NAME: ${{ vars.SOLUTION_NAME }}
20-
DOTNET_VERSION: '9.0.x'
21-
24+
DOTNET_VERSION: "9.0.x"
25+
2226
jobs:
2327
test:
2428
runs-on: ubuntu-latest
@@ -53,7 +57,7 @@ jobs:
5357
dotnet test --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --logger:trx --results-directory:./TestResults ${{ env.SOLUTION_NAME }}
5458
5559
- name: Upload Test Results
56-
uses: actions/upload-artifact@v4 # upload test results
60+
uses: actions/upload-artifact@v3 # upload test results
5761
if: success() || failure() # run this step even if previous step failed
5862
with:
5963
name: test-results
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
required: true
1515
default: false
1616

17+
permissions:
18+
contents: write
19+
1720
env:
1821
ALLOW_PRERELEASE: ${{ startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/') }}
1922

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
pull_request:
1313
types: [ opened, closed ]
1414

15+
permissions:
16+
issues: write
17+
pull-requests: write
18+
1519
jobs:
1620
create_issue_branch_job:
1721
runs-on: ubuntu-latest
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ on:
55
# release:
66
# types: [deleted]
77

8+
permissions:
9+
contents: write
10+
811
env:
912
BRANCH_NAME: ${{ github.event.release.target_commitish }}
1013
PROJECT_NAME: ${{ vars.PROJECT_NAME }}
11-
14+
1215
jobs:
1316
publish:
1417
name: unlist on nuget
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
required: true
1414
default: 'patch'
1515

16+
permissions:
17+
contents: write
18+
actions: read
19+
1620
env:
1721
ALLOW_UPDATES: ${{ startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/') }}
1822

Hyperbee.Collections.sln

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1FA7
2020
EndProject
2121
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{4DBDB7F5-3F66-4572-80B5-3322449C77A4}"
2222
ProjectSection(SolutionItems) = preProject
23-
.github\workflows\Create Issue Branch.yml = .github\workflows\Create Issue Branch.yml
24-
.github\workflows\Create Release.yml = .github\workflows\Create Release.yml
23+
.github\workflows\create-release.yml = .github\workflows\create-release.yml
24+
.github\workflows\deploy-gh-pages.yml = .github\workflows\deploy-gh-pages.yml
2525
.github\workflows\format.yml = .github\workflows\format.yml
26+
.github\workflows\issue-branch.yml = .github\workflows\issue-branch.yml
2627
.github\workflows\publish.yml = .github\workflows\publish.yml
27-
.github\workflows\Test Report.yml = .github\workflows\Test Report.yml
28+
.github\workflows\test-report.yml = .github\workflows\test-report.yml
2829
.github\workflows\test.yml = .github\workflows\test.yml
29-
Unlist Nuget.yml = Unlist Nuget.yml
30-
.github\workflows\Update Version.yml = .github\workflows\Update Version.yml
30+
.github\workflows\unlist-nuget.yml = .github\workflows\unlist-nuget.yml
31+
.github\workflows\update-version.yml = .github\workflows\update-version.yml
3132
EndProjectSection
3233
EndProject
3334
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbee.Collections", "src\Hyperbee.Collections\Hyperbee.Collections.csproj", "{574DD649-BC5B-40F5-92E5-BE6A289D4C92}"

0 commit comments

Comments
 (0)