Skip to content

Commit

Permalink
upload sbom with release (#27)
Browse files Browse the repository at this point in the history
* Create releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml

* Update releaser.yaml
  • Loading branch information
anubhav6663 committed Apr 5, 2023
1 parent 9004504 commit fbc0895
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/releaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: SBOM with tag release

on:
push:
tags:
- 'v*'

jobs:
run_on_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run script on release
run: |
echo "New release created: ${{ github.event.release.tag_name }}"
# Run your desired script or command here
pip install cyclonedx-bom
cyclonedx-py -r -i ../logicmonitor_data_sdk_py/requirements.txt --format json -o sbom.json
# ls
# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v3.1.2
# with:
# # Artifact name
# name: sbom_report
# # A file, directory or wildcard pattern that describes what to upload
# path: sbom.json
# # - name: release
# uses: actions/create-release@v1
# id: create_release
# with:
# draft: false
# prerelease: false
# release_name: ${{ steps.version.outputs.version }}
# tag_name: ${{ github.ref }}
# #body_path: sbom.json
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload files to a GitHub release
uses: svenstaro/upload-release-action@2.5.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: sbom.json
asset_name: sbom.json
tag: ${{ github.ref }}
overwrite: true
body: "SBOM for release"



0 comments on commit fbc0895

Please sign in to comment.