Skip to content

Commit

Permalink
Temp commit.
Browse files Browse the repository at this point in the history
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
  • Loading branch information
askpt committed Feb 4, 2025
1 parent 233e787 commit d842f6a
Showing 1 changed file with 54 additions and 56 deletions.
110 changes: 54 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,57 @@
name: Run Release Release

on:
push:
branches:
- main
on: workflow_dispatch

jobs:
release-please:
runs-on: ubuntu-latest

steps:
- uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3
id: release
with:
command: manifest
token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}}
default-branch: main
signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>"
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: Setup .NET SDK
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
8.0.x
9.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json

- name: Install dependencies
run: dotnet restore

- name: Pack
run: dotnet pack -c Release --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
# release-please:
# runs-on: ubuntu-latest
#
# steps:
# - uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3
# id: release
# with:
# command: manifest
# token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}}
# default-branch: main
# signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>"
# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# fetch-depth: 0
#
# - name: Setup .NET SDK
# uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4
# env:
# NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# dotnet-version: |
# 8.0.x
# 9.0.x
# source-url: https://nuget.pkg.github.com/open-feature/index.json
#
# - name: Install dependencies
# run: dotnet restore
#
# - name: Pack
# run: dotnet pack -c Release --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
# needs: release-please
continue-on-error: true
if: ${{ needs.release-please.outputs.release_created }}
# if: ${{ needs.release-please.outputs.release_created }}

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand All @@ -74,10 +71,11 @@ jobs:
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
# run: dotnet CycloneDX --json --exclude-dev -sv "${{ needs.release-please.outputs.release_tag_name }}" ./src/OpenFeature/OpenFeature.csproj
run: dotnet CycloneDX --json --exclude-dev ./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

0 comments on commit d842f6a

Please sign in to comment.