Skip to content

Commit

Permalink
ci: Build release binaries by OS in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 10, 2024
1 parent 4e806ae commit ebb09b4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Release binaries'

on:
push:

permissions:
contents: write

jobs:
build:
runs-on: ${{ matrix.vm }}
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
- run: |
ls -l target/release
- name: 'Make archive (*nix)'
if: runner.os != 'Windows'
run: |
mkdir -p ${{ env.archive_dir }}
cp README.md LICENSE target/release/gazer ${{ env.archive_dir }}
ls -lR dist
env:
archive_dir: 'dist/gazer-${{ github.ref_name }}_${{ matrix.vm }}'
- name: 'Make archive (Windows)'
if: runner.os == 'Windows'
run: |
mkdir -p ${{ env.archive_dir }}
Copy-Item -Path README.md,LICENSE,target/release/gazer.exe -Destination ${{ env.archive_dir }}
ls -l dist
env:
archive_dir: 'dist/gazer-${{ github.ref_name }}_${{ matrix.vm }}'

0 comments on commit ebb09b4

Please sign in to comment.