Skip to content

Commit 31d0247

Browse files
committed
update release upload (this must be last please!!!!)
1 parent b5297db commit 31d0247

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ jobs:
2929
- run: pip install -r requirements.txt pyinstaller Pillow
3030
- run: pyinstaller main.py --onefile --collect-data=grapheme --name=ncp-${{ matrix.name }}
3131
- run: ./dist/ncp-${{ matrix.name }} --help
32-
- run: |
33-
cd dist
34-
gh release create $(git rev-parse --short HEAD) * --title "Release $(git rev-parse --short HEAD)" --latest
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
shell: bash
32+
- id: vars
33+
run: |
34+
if [[ ${{ matrix.os }} == 'windows-latest' ]]; then
35+
set sha_short=$(git rev-parse --short HEAD)
36+
else
37+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
38+
fi
39+
- uses: softprops/action-gh-release@v1
40+
with:
41+
files: dist/*
42+
name: Release ${{ steps.vars.outputs.sha_short }}
43+
tag_name: ${{ steps.vars.outputs.sha_short }}
44+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)