Skip to content

Handle Release #6

Handle Release

Handle Release #6

Workflow file for this run

name: Build Artifacts
on:
workflow_dispatch:
inputs:
do_release:
description: "Perform a release?"
required: true
type: boolean
default: false
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: cargo build --release --bin aplang
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: windows-binary
path: target/release/aplang.exe
build-windows-portable:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
cargo build --release --no-default-features --features portable --bin aplang
mv target/release/aplang.exe target/release/aplang-portable.exe
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: windows-portable-binary
path: target/release/aplang-portable.exe
build-macos:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: cargo build --release --no-default-features --features portable --bin aplang
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: macos-binary
path: target/release/aplang-portable
build-macos-portable:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
cargo build --release --no-default-features --features portable --bin aplang
mv target/release/aplang target/release/aplang-portable
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: macos-portable-binary
path: target/release/aplang
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build-windows, build-windows-portable, build-macos, build-macos-portable]
steps:
- name: Download Windows binary
uses: actions/download-artifact@v4
with:
name: windows-binary
path: artifacts/windows-binary/
- name: Download Windows portable binary
uses: actions/download-artifact@v4
with:
name: windows-portable-binary
path: artifacts/windows-portable-binary/
- name: Download macOS binary
uses: actions/download-artifact@v4
with:
name: macos-binary
path: artifacts/macos-binary/
- name: Download macOS portable binary
uses: actions/download-artifact@v4
with:
name: macos-portable-binary
path: artifacts/macos-portable-binary/
- name: List Downloaded Files
run: ls -R artifacts
- name: Create GitHub Release
if: github.event.inputs.do_release == 'true'
uses: softprops/action-gh-release@v2
with:
prerelease: true
draft: true
generate_release_notes: true
files: |
artifacts/windows-binary/aplang.exe
artifacts/windows-portable-binary/aplang-portable.exe
artifacts/macos-binary/aplang
artifacts/macos-portable/aplang-portable