Skip to content

Commit

Permalink
chore(actions): separate build and release for matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
CompeyDev committed May 27, 2024
1 parent 4095b3e commit 2a475c5
Showing 1 changed file with 38 additions and 7 deletions.
45 changes: 38 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@ on:
- "**"
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
build:
strategy:
fail-fast: false
matrix:
include:
- name: Windows x86_64
runner-os: windows-latest
artifact-name: lune-windows-x86_64

- name: Linux x86_64
runner-os: ubuntu-latest
artifact-name: lune-linux-x86_64

name: Build - ${{ matrix.name }}
runs-on: ${{ matrix.runner-os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -36,8 +48,27 @@ jobs:
id: export
run: echo "zip=$(echo ./target/release/fox32asm-*.zip)" >> "$GITHUB_OUTPUT"

- name: Publish artifacts
uses: ncipollo/release-action@v1
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
artifacts: "${{ steps.export.outputs.zip }}"
draft: true
name: ${{ matrix.artifact-name }}
path: "${{ steps.export.outputs.zip }}"

create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: ["build"]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./build

- name: Publish release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
fail_on_unmatched_files: true
files: ./build/*.zip
draft: true

0 comments on commit 2a475c5

Please sign in to comment.