Skip to content

Commit

Permalink
Create cd.yml.
Browse files Browse the repository at this point in the history
Will this work?
  • Loading branch information
monomycelium authored Jun 30, 2024
1 parent df6ded1 commit 0b89743
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Continuous Deployment

on:
push:
tags:
- "v*.*.*"

jobs:
publish-github:
name: Publish on GitHub
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
TARGET:
[
x86_64-linux,
x86_64-macos,
x86_64-windows,
aarch64-linux,
aarch64-macos,
aarch64-windows,
arm-linux,
riscv64-linux,
i386-linux,
]
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set the release version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV

- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0

- name: Build
run: zig build -Drelease-fast -Dtarget=${{ matrix.TARGET }}

- name: Upload the binary
uses: svenstaro/upload-release-action@v2
with:
file: zig-out/bin/rf-${{ env.RELEASE_VERSION }}-${{ matrix.TARGET }}*
file_glob: true
overwrite: true
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0b89743

Please sign in to comment.