chore(release): v4.0.0 Documentation Update (#107) #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release PiOSK Binaries | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: read | |
jobs: | |
build: | |
name: Build for ${{ matrix.os }} | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
include: | |
# Linux x86_64 | |
- os: linux-x64 | |
runner: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
output: piosk-linux-x64 | |
# Linux ARM64 | |
- os: linux-arm64 | |
runner: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
output: piosk-linux-arm64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Compile binary | |
run: | | |
deno compile \ | |
--allow-net \ | |
--allow-read \ | |
--allow-write \ | |
--allow-run \ | |
--allow-env \ | |
--target ${{ matrix.target }} \ | |
--output ${{ matrix.output }} \ | |
index.ts | |
- name: Archive binary | |
run: tar -czf ${{ matrix.output }}.tar.gz ${{ matrix.output }} | |
- name: Upload binary as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.output }} | |
path: ${{ matrix.output }}.tar.gz | |
if-no-files-found: ignore | |
release: | |
name: Create Release | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./artifacts | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./artifacts/*/*.tar.gz | |
draft: false | |
prerelease: true | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |