Skip to content

[NVSHAS-9630] Add release.yaml for scan-action slsa #1

[NVSHAS-9630] Add release.yaml for scan-action slsa

[NVSHAS-9630] Add release.yaml for scan-action slsa #1

Workflow file for this run

name: "release"
on:
push:
tags:
- 'v*'
env:
TAG: ${{ github.ref_name }}
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.7.0
- name: Check out code
uses: actions/checkout@v4
- name: Lint Dockerfile
uses: hadolint/[email protected]
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- name: Check if README is up-to-date
run: |
npm run docs
git status
git diff --quiet || echo 'README is not up-to-date, run `npm install && npm run docs` to update.'
git diff --quiet || exit 1
- name: Run tests
run: bats test
release:
name: Draft GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.TAG }} --draft --notes "Automated release of version ${{ env.TAG }}"