Skip to content

Commit

Permalink
Merge e25a1af into d7ac3b8
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielweyer authored Apr 9, 2022
2 parents d7ac3b8 + e25a1af commit 79edac5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gabrielweyer
21 changes: 16 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@ on:
push:
branches:
- main
- 'features/**'
paths-ignore:
- 'docs/**'
- .editorconfig
- LICENSE
- README.md
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- .editorconfig
- LICENSE
- README.md
jobs:
Build:
build:
name: Build
runs-on: ubuntu-latest
env:
CREATE_RELEASE: ${{ github.ref_name == 'main' && !contains(github.event.head_commit.message, '[skip-release]') }}
CREATE_PRERELEASE: ${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'features/') && !contains(github.event.head_commit.message, '[skip-release]') }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -44,19 +55,19 @@ jobs:
path: 'artifacts/test-results/*.trx'
reporter: dotnet-trx
- name: Create GitHub release on main branch
if: ${{ github.ref_name == 'main' }}
if: ${{ env.CREATE_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
touch empty-release-notes.txt
gh release create v${{ env.PACKAGE_VERSION }} --title v${{ env.PACKAGE_VERSION }} ./artifacts/packages/* --target ${{ github.sha }} --repo ${{ github.repository }} --notes-file empty-release-notes.txt
- name: Create GitHub prerelease on features branches
if: ${{ startsWith(github.ref_name, 'features/') }}
if: ${{ env.CREATE_PRERELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
touch empty-release-notes.txt
gh release create v${{ env.PACKAGE_VERSION }} --title v${{ env.PACKAGE_VERSION }} ./artifacts/packages/* --target ${{ github.sha }} --repo ${{ github.repository }} --notes-file empty-release-notes.txt --prerelease
- name: Push NuGet package on main branch
if: ${{ github.ref_name == 'main' }}
if: ${{ env.CREATE_RELEASE == 'true' }}
run: dotnet nuget push ./artifacts/packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL"
name: "C# Security scanning"

on:
push:
Expand Down

0 comments on commit 79edac5

Please sign in to comment.