Skip to content

ci: Merge artifacts for release job #14

ci: Merge artifacts for release job

ci: Merge artifacts for release job #14

Workflow file for this run

name: 'Release binaries'
on:
push:
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.vm }}
env:
release_name: 'gazer-${{ github.ref_name }}_${{ matrix.name }}'
strategy:
matrix:
include:
- name: linux
vm: ubuntu-latest
- name: macosx
vm: macos-latest
- name: windows
vm: windows-latest
steps:
- uses: 'actions/checkout@v4'
- name: 'Build'
run: cargo build --release
- name: 'Collect release items (*nix)'
if: runner.os != 'Windows'
run: |
mkdir -p dist/$release_name
cp README.md LICENSE target/release/gazer dist/$release_name
- name: 'Collect release items (windows)'
if: runner.os == 'Windows'
run: |
mkdir -p dist/$env:release_name
Copy-Item -Path README.md,LICENSE,target/release/gazer.exe -Destination dist/$env:release_name
- name: 'Make archive'
uses: thedoctor0/zip-release@master
with:
type: zip
directory: 'dist'
path: '${{ env.release_name }}'
filename: '${{ env.release_name }}.zip'
- uses: actions/upload-artifact@v4
with:
name: 'release-${{ env.release_name }}'
path: 'dist/${{ env.release_name }}.zip'
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v4
- run: ls -lR dist