Skip to content

Commit

Permalink
Pass version to create release
Browse files Browse the repository at this point in the history
  • Loading branch information
paralleltree committed Sep 23, 2024
1 parent 8583f31 commit ddb2a56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Build

on:
workflow_call:
outputs:
version:
value: ${{ jobs.build.outputs.version }}

env:
PACKAGE_NAME: dev.paltee.avatar-aid

jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.value }}
steps:
- name: Setup package path
run: echo "PACKAGE_PATH=Packages/${{ env.PACKAGE_NAME }}" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "$(gh release view --repo ${{ github.repository }} ${{ env.VERSION }} 2>&1)" != 'release not found' ]; then
if [ "$(gh release view --repo ${{ github.repository }} ${{ needs.build.outputs.version }} 2>&1)" != 'release not found' ]; then
echo "Release already exists"
exit 1
fi
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION }}
tag_name: ${{ needs.build.outputs.version }}
draft: true
files: |
${{ env.ZIP_FILE_PATH }}
Expand Down

0 comments on commit ddb2a56

Please sign in to comment.