Skip to content

refactor: Rename job step #8

refactor: Rename job step

refactor: Rename job step #8

# This workflow runs when a tag is created with the `v` prefix or a push
# to main occurs. It runs our validation script, outputs the artifact,
# creates a new tag, Github release, and uploads/associates the artifact with the release.
name: Release artifact
on:
workflow_call:
push:
branches:
#- main
- feature/validation-workflow
- andrew/NR-268466-main-validation
tags:
- 'v*'
# Permissions for attestation
permissions:
id-token: write
contents: write
attestations: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
ref: ${{ github.ref }}
- name: Setup workspace
uses: "./.github/actions/bootstrap"
- name: Validate and generate artifact
uses: "./.github/actions/build-validate-artifact"
with:
command-args: '--output-artifact'
- name: Attest artifact
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c
with:
subject-path: utils/build/*
- name: Create new release tag
# Only run if this is a branch push (we'll need a new tag)
if: ${{ startsWith(github.ref, 'refs/heads') }}
id: version
uses: "./.github/actions/bump-version-tag"
- name: Create release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
with:
files: utils/build/*
fail_on_unmatched_files: true
make_latest: true
# If we have a tag output from the previous step, use that as the tag
# name, otherwise use the current ref which should be the tag.
tag_name: ${{ steps.version.outputs.tag || github.ref }}