Merge pull request #41 from hendriknielaender/0.13.0 #60
Workflow file for this run
This file contains 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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.12.0 | |
- name: Build release | |
run: zig build release | |
- name: Archive executables | |
run: | | |
mkdir -p artifacts | |
for binary in zig-out/*; do | |
tar -czvf artifacts/$(basename "$binary").tar.gz -C zig-out $(basename "$binary") | |
done | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: zvm-artifacts | |
path: artifacts/*.tar.gz | |
# This job will need to be modified to handle multiple artifacts | |
create-release: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Download all artifacts dynamically | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: zvm-artifacts | |
path: artifacts/ | |
- name: List artifacts | |
run: ls -la artifacts/ | |
- name: Create and Upload Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "artifacts/*.tar.gz" | |
artifactErrorsFailBuild: true | |
generateReleaseNotes: true | |
tag: ${{ github.ref }} | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
allowUpdates: true | |
token: ${{ secrets.GITHUB_TOKEN }} |