Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
include:
- os: ubuntu-latest
artifact_name: yaft-linux-x64
asset_name: yaft-linux-x64
package_name: yaft-linux-x64
- os: windows-latest
artifact_name: yaft-windows-x64.exe
asset_name: yaft-windows-x64.exe
package_name: yaft-windows-x64
- os: macos-latest
artifact_name: yaft-macos-x64
asset_name: yaft-macos-x64
package_name: yaft-macos-x64

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -70,13 +70,30 @@ jobs:
src/yaft/cli.py
shell: bash

- name: Upload executable artifact
- name: Create package directory (Windows)
if: runner.os == 'Windows'
run: |
New-Item -ItemType Directory -Path "package" -Force
Copy-Item "dist\${{ matrix.artifact_name }}" -Destination "package\" -Force
Copy-Item -Path "config" -Destination "package\config" -Recurse -Force
Compress-Archive -Path "package\*" -DestinationPath "${{ matrix.package_name }}.zip"
shell: pwsh

- name: Create package directory (Unix)
if: runner.os != 'Windows'
run: |
mkdir -p package
cp "dist/${{ matrix.artifact_name }}" package/
chmod +x "package/${{ matrix.artifact_name }}"
cp -r config package/
cd package && zip -r "../${{ matrix.package_name }}.zip" * && cd ..
shell: bash

- name: Upload packaged artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
dist/${{ matrix.artifact_name }}
dist/${{ matrix.artifact_name }}.exe
name: ${{ matrix.package_name }}
path: ${{ matrix.package_name }}.zip

create-release:
name: Create GitHub Release
Expand Down Expand Up @@ -105,7 +122,7 @@ jobs:
prerelease: false
generate_release_notes: true
files: |
artifacts/**/*
artifacts/**/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
Loading
Loading