Skip to content

Commit 8a46b0e

Browse files
authored
Merge pull request #871 from aws-powertools/fix-workflow
chore: Update publish-artifacts-examples-tests.yml
2 parents 4c8cec9 + 740acdf commit 8a46b0e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/publish-artifacts-examples-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
run: dotnet test ./examples/ --no-restore --configuration Release --verbosity normal
109109

110110
publish-packages:
111-
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
111+
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || ${{ github.event_name == 'workflow_dispatch' }}
112112
needs: run-tests
113113
runs-on: ubuntu-latest
114114
permissions:
@@ -130,13 +130,10 @@ jobs:
130130
- name: Setup GitHub Packages source
131131
run: |
132132
dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json \
133-
--name github \
134-
--username ${{ github.actor }} \
135-
--password ${{ secrets.GITHUB_TOKEN }}
136-
--store-password-in-clear-text
133+
--name github
137134
138135
- name: Publish packages to GitHub Packages
139136
run: |
140137
for package in ./packages/*.nupkg; do
141138
dotnet nuget push $package --source github --api-key ${{ secrets.GITHUB_TOKEN }}
142-
done
139+
done

0 commit comments

Comments
 (0)