Skip to content

bugfix to release workflow #6 #83

bugfix to release workflow #6

bugfix to release workflow #6 #83

Workflow file for this run

name: Release
on:
push:
tags:
- 'v**'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Zig Compiler
run: mkdir compiler && wget -O zig.tar.xz https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz && tar -xvf zig.tar.xz && mv zig-linux*/lib zig-linux*/zig compiler && rm -rf zig*
- name: Build Acorn
run: ./compiler/zig build --release=fast --summary all
- name: Make the Binary Folder
run: mkdir bin
- name: Rename and Move Binaries
run: |
cd zig-out && for FOLDER in *linux; do mv $FOLDER/acorn ../bin/acorn-$FOLDER; done && cd -
cd zig-out && for FOLDER in *macos; do mv $FOLDER/acorn ../bin/acorn-$FOLDER; done && cd -
cd zig-out && for FOLDER in *windows; do mv $FOLDER/acorn.exe ../bin/acorn-$FOLDER.exe; done && cd -
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: bin
path: bin
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Release aarch64-linux Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-aarch64-linux
tag: ${{github.ref}}
- name: Release aarch64-macos Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-aarch64-macos
tag: ${{github.ref}}
- name: Release aarch64-windows Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-aarch64-windows.exe
tag: ${{github.ref}}
- name: Release arm-linux Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-arm-linux
tag: ${{github.ref}}
- name: Release riscv64-linux Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-riscv64-linux
tag: ${{github.ref}}
- name: Release x86_64-linux Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-x86_64-linux
tag: ${{github.ref}}
- name: Release x86_64-macos Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-x86_64-macos
tag: ${{github.ref}}
- name: Release x86_64-windows Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: bin/acorn-x86_64-windows.exe
tag: ${{github.ref}}