Skip to content

fix: expression missed the env #4

fix: expression missed the env

fix: expression missed the env #4

Workflow file for this run

name: Create Release Draft
on:
workflow_dispatch:
push:
branches: [master]
env:
ARCHIVE_NAME: outer_scout
jobs:
check-manifest:
name: Check For Existing Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read Addon Version
id: read-manifest-version
uses: SebRollen/[email protected]
with:
file: blender_manifest.toml
field: version
- name: Check For Release
id: check-tag
uses: mukunku/[email protected]
with:
tag: "v${{ steps.read-manifest-version.outputs.value }}"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Output Version Info
id: out
run: |
echo "version=${{ steps.read-manifest-version.outputs.value }}" >> $GITHUB_OUTPUT
echo "release_exists=${{ steps.check-tag.outputs.exists }}" >> $GITHUB_OUTPUT
- name: Error
if: ${{ steps.out.outputs.release_exists != 'false' }}
run: echo "::error file=blender_manifest.toml,title=Refusing to Release::New release was not created because there is already a release with the version in blender_manifest.toml"
release:
name: Create Release
runs-on: ubuntu-latest
needs: check-manifest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ./sources
- name: Remove Dev Files
working-directory: ./sources
run: |
rm .gitignore
rm .pre-commit-config.yaml
rm pyproject.toml
rm requirements-dev.txt
- name: Zip For Release
run: 7z a ./${{ env.ARCHIVE_NAME }}.zip ./sources
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARCHIVE_NAME }}.zip
path: ./${{ env.ARCHIVE_NAME }}.zip
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: master
tag: v${{ needs.check-manifest.outputs.version }}
name: Version ${{ needs.check-manifest.outputs.version }}
omitBodyDuringUpdate: true
artifacts: ${{ env.ARCHIVE_NAME }}.zip
draft: true
prerelease: false
generateReleaseNotes: true