Created
June 8, 2020 22:24
-
-
Save jeffpapp/ba27bd5fea6618d0a2c0d5b00a602fbe to your computer and use it in GitHub Desktop.
GitHub Packages Private Nuget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build .Net Core projects | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- dev | |
env: | |
GitHubPackagesUser: <User who created the PersonalAccessToken> #Since this has to be associated with a GitHub user this should be a bot or an owner of the org | |
GitHubPackagesPersonalAccessToken: ${{secrets.GitHubPackagesPersonalAccessToken}} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.101 | |
- name: Install dependencies | |
run: dotnet restore --no-cache | |
- name: Build | |
run: dotnet build --configuration Release --no-restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<clear /> | |
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> | |
<add key="github" value="https://nuget.pkg.github.com/<GitHubOrgName>/index.json" /> | |
</packageSources> | |
<packageSourceCredentials> | |
<github> | |
<add key="Username" value="%GitHubPackagesUser%" /> | |
<add key="ClearTextPassword" value="%GitHubPackagesPersonalAccessToken%" /> | |
</github> | |
</packageSourceCredentials> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment