Skip to content

Commit

Permalink
refact actions
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-marquez committed Oct 15, 2024
1 parent 0e96998 commit e61e891
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
tags:
- 'v*'

permissions:
contents: write

jobs:
build:
runs-on: windows-latest
Expand All @@ -29,16 +32,13 @@ jobs:

- name: Prepare release package
run: |
# Create a release folder
mkdir NIKKE-OCR-release
# Copy only the necessary files
xcopy /E /I dist\NIKKE-OCR NIKKE-OCR-release
- name: Zip release package
run: Compress-Archive -Path .\NIKKE-OCR-release -DestinationPath .\NIKKE-OCR.zip

- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -50,7 +50,6 @@ jobs:
prerelease: false

- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -61,7 +60,7 @@ jobs:
asset_content_type: application/zip

- name: Upload artifact for debugging
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
if: failure()
uses: actions/upload-artifact@v3
with:
name: NIKKE-OCR
Expand Down

0 comments on commit e61e891

Please sign in to comment.