Skip to content

Commit

Permalink
Merge pull request #8 from jwthomson/gh-actions
Browse files Browse the repository at this point in the history
GitHub actions - restrict publish to main branch only
  • Loading branch information
isaacabraham authored Jan 12, 2024
2 parents 38c7c8d + 0704073 commit 83a5b09
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.200
- name: Restore tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore
working-directory: ./fable/Feliz.ReactSelect
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: ./fable/Feliz.ReactSelect
- name: Publish
uses: brandedoutcast/publish-nuget@v2.5.2
with:
PROJECT_FILE_PATH: fable/Feliz.ReactSelect/Feliz.ReactSelect.fsproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

- name: Check out
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.200
- name: Restore tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore
working-directory: ./fable/Feliz.ReactSelect
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: ./fable/Feliz.ReactSelect
- name: Publish
uses: brandedoutcast/publish-nuget@v2.5.2
if: ${{ github.ref == 'refs/heads/main' }}
with:
PROJECT_FILE_PATH: fable/Feliz.ReactSelect/Feliz.ReactSelect.fsproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

0 comments on commit 83a5b09

Please sign in to comment.