ci: ci skip: sample release #151
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: main | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
name: Build | |
if: "!contains(github.event.commits[0].message, 'ci skip')" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print GH context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: Build | |
run: zig build test | |
- name: Release from tags | |
if: startsWith(github.event.ref, 'refs/tags/v') | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
echo "todo: release here" | |
zig build -Doptimize=ReleaseFast --summary all | |
cp zig-out/bin/zgroup ./ | |
ls -laF | |
tar czvf zgroup-${GITHUB_REF_NAME}.tar.gz zgroup | |
ls -laF | |
gh release create ${GITHUB_REF_NAME} ./*.tar.gz --generate-notes |