Skip to content

Updating CICD

Updating CICD #32

name: Create and publish pre-release
on:
push:
branches: ['develop', 'cicd']
jobs:
create-pre-release:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Parse current version
id: get-app-version
run: echo "VERSION=$(cat src/SlicerBoneMorphing.py | grep Version | awk '{print $2}')" >> $GITHUB_OUTPUT
- name: Create ZIP archive
env:
VERSION: ${{steps.get-app-version.outputs.version}}
run: |
cd src
echo $version
zip -r SlicerBoneMorphing-$VERSION.zip ./*
cd ..
cp src/SlicerBoneMorphing-$VERSION.zip .
- name: Create pre-release
id: create-pre-release
uses: actions/create-release@v1
env:
VERSION: ${{ steps.get-app-version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ env.VERSION }}
tag_name: v${{ VERSION }}

Check failure on line 41 in .github/workflows/create-pre-release.yaml

View workflow run for this annotation

GitHub Actions / Create and publish pre-release

Invalid workflow file

The workflow is not valid. .github/workflows/create-pre-release.yaml (Line: 41, Col: 21): Unrecognized named-value: 'VERSION'. Located at position 1 within expression: VERSION
body_path: CHANGELOG.md
draft: false
prerelease: true
- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
VERSION: ${{ steps.get-app-version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-pre-release.outputs.upload_url }}
asset_path: SlicerBoneMorphing-${{ env.VERSION }}.zip
asset_name: "SlicerBoneMorphing-${{ env.VERSION }}.zip"
asset_content_type: application/gzip