fix: Add missing error message when an error occurred (#256) #144
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: Run Release Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
command: manifest | |
token: ${{secrets.GITHUB_TOKEN}} | |
default-branch: main | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
release_tag_name: ${{ steps.release.outputs.tag_name }} | |
release: | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
source-url: https://nuget.pkg.github.com/open-feature/index.json | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Pack | |
run: dotnet pack --no-restore | |
- name: Publish to Nuget | |
run: dotnet nuget push "src/**/*.nupkg" --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json | |
sbom: | |
runs-on: ubuntu-latest | |
needs: release-please | |
continue-on-error: true | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install CycloneDX.NET | |
run: dotnet tool install CycloneDX | |
- name: Generate .NET BOM | |
run: dotnet CycloneDX --json --exclude-dev -sv "${{ needs.release-please.outputs.release_tag_name }}" ./src/OpenFeature/OpenFeature.csproj | |
- name: Attach SBOM to artifact | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | |
gh release upload ${{ needs.release-please.outputs.release_tag_name }} bom.json |