Skip to content

Update packaging workflow to upload release tarball as release asset #29

Update packaging workflow to upload release tarball as release asset

Update packaging workflow to upload release tarball as release asset #29

Workflow file for this run

name: packaging
on:
push:
tags:
- "v[1-9].[0-9]+.[0-9]+*"
- "rocm-[0-9]+.[0-9]+.[0-9]+*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
distbuild:
runs-on: ubuntu-latest
name: Create release distribution
env:
INSTALL_DIR: /tmp
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Verify VERSION file consistent with tag
run: utils/ver_check.py --tag ${{github.ref_name}}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Python dependency installs
run: python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
- name: Configure
run: |
mkdir build
cd build
cmake -DPYTHON_DEPS=${INSTALL_DIR}/python-libs ..
- name: Release tarball
run: |
cd build
make package_source
- name: Rename tarball
run: mv build/omniperf-*.tar.gz build/omniperf-${{github.ref_name}}.tar.gz
- name: Archive tarball
uses: actions/upload-artifact@v4
with:
name: omniperf-${{github.ref_name}}.tar.gz
path: build/omniperf-${{github.ref_name}}.tar.gz
- name: Set version
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
- name: Set ROCm release name
run: echo "RELASE_NAME=Omniperf ${{ env.VERSION }} for ${{github.ref_name}} " > $GITHUB_ENV
- name: Upload tarball Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'ROCm/omniperf'
with:
fail_on_unmatched: True
draft: True
name: ${{ startsWith(github.ref_name, 'rocm-') ? ${{ env.RELEASE_NAME }} : "Omniperf ${{ env.VERSION }}" }}

Check failure on line 56 in .github/workflows/packaging.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/packaging.yml

Invalid workflow file

You have an error in your yaml syntax on line 56
files: |
omniperf-*.tar.gz