Skip to content

Commit db76018

Browse files
committed
Fixes for missing shell properties
1 parent a93997c commit db76018

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ A Composite Action that Builds, Publishes and Releases a .NET 6 Library
77

88
**Required** The Project Name (e.g. RICADO.Logging)
99

10+
### `github-token`
11+
12+
**Required** The GitHub Token used to Generate a Changelog and Create Releases
13+
1014
### `private-nuget-url`
1115

1216
**Required** The URL of the Private NuGet Repository (e.g. https://nuget.pkg.github.com/myname/index.json)
@@ -31,14 +35,21 @@ _Optional_ Whether the Library should be Published to the Public NuGet Repositor
3135

3236
Defaults to `false`
3337

38+
## Outputs
39+
40+
### `changelog`
41+
42+
A Markdown formatted changelog
43+
3444
## Example Usage
3545

3646
```yml
37-
uses: ricado-group/dotnet-library-build-release-action@v1.1
47+
uses: ricado-group/dotnet-library-build-release-action@v1.2
3848
with:
3949
project-name: 'RICADO.Logging'
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
4051
private-nuget-url: 'https://nuget.pkg.github.com/myname/index.json'
41-
private-nuget-token: ${{ secrets.GITHUB_ACCESS_TOKEN }}
42-
public-nuget-token: ${{ secrets.NUGET_TOKEN }}
52+
private-nuget-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
53+
public-nuget-token: ${{ secrets.NUGET_APIKEY }}
4354
publish-public: true
4455
```

action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ inputs:
1010
project-name:
1111
description: 'The Project Name (e.g. RICADO.Logging)'
1212
required: true
13+
github-token:
14+
description: 'The GitHub Token used to Generate a Changelog and Create Releases'
15+
required: true
1316
private-nuget-url:
1417
description: 'The URL of the Private NuGet Repository (e.g. https://nuget.pkg.github.com/myname/index.json)'
1518
required: true
@@ -53,41 +56,46 @@ runs:
5356
# Step 3 - Restore NuGet Packages
5457
- name: Restore NuGet Packages
5558
run: dotnet restore "${{ inputs.project-name }}/${{ inputs.project-name }}.csproj"
59+
shell: bash
5660

5761
# Step 4 - Build the Library
5862
- name: Build the Library
5963
run: dotnet build "${{ inputs.project-name }}/${{ inputs.project-name }}.csproj" -c Release --no-restore
64+
shell: bash
6065

6166
# Step 5 - Pack the Library
6267
- name: Pack the Library
6368
if: ${{ startsWith(github.ref, 'refs/tags/') }}
6469
run: dotnet pack "${{ inputs.project-name}}/${{ inputs.project-name }}.csproj" -c Release -p:PackageVersion=${{ env.CI_REF_NAME }}
70+
shell: bash
6571

6672
# Step 6 - Push the Package to GitHub Packages
6773
- name: Push the Package to GitHub Packages
6874
if: ${{ startsWith(github.ref, 'refs/tags/') }}
6975
run: dotnet nuget push "${{ inputs.project-name }}/bin/Release/*.nupkg" -k ${{ inputs.private-nuget-token }} -s "${{ inputs.private-nuget-url }}" --skip-duplicate
76+
shell: bash
7077

7178
# Step 7 - Push the Package to NuGet
7279
- name: Push the Package to Nuget
7380
if: ${{ startsWith(github.ref, 'refs/tags/') && inputs.publish-public == 'true' }}
7481
run: dotnet nuget push "${{ inputs.project-name }}/bin/Release/*.nupkg" -k ${{ inputs.public-nuget-token }} -s "${{ inputs.public-nuget-url }}" --skip-duplicate
82+
shell: bash
7583

7684
# Step 8 - Generate the Changelog
7785
- name: Generate the Changelog
7886
id: changelog
7987
if: ${{ startsWith(github.ref, 'refs/tags/') }}
8088
uses: metcalfc/changelog-generator@v3.0.0
8189
with:
82-
myToken: ${{ secrets.GITHUB_TOKEN }}
90+
myToken: ${{ inputs.github-token }}
8391

8492
# Step 9 - Create New Release
8593
- name: Create New Release
8694
id: create-release
8795
if: ${{ startsWith(github.ref, 'refs/tags/') }}
8896
uses: softprops/action-gh-release@v1
8997
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
GITHUB_TOKEN: ${{ inputs.github-token }}
9199
with:
92100
tag_name: ${{ env.CI_REF_NAME }}
93101
name: Version ${{ env.CI_REF_NAME }}

0 commit comments

Comments
 (0)