Skip to content

👷 Persist artifacts #11

👷 Persist artifacts

👷 Persist artifacts #11

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
group: github.ref
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run lint
build:
needs: [lint]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build:ci --workspace cli
- name: Get current package version
id: current_version
run: echo "version=$(grep '.version =' build.zig.zon | sed 's/.*.version = "\([^"]*\)".*/\1/')" >> $GITHUB_OUTPUT
working-directory: apps/cli
- uses: mukunku/[email protected]
id: check_tag
with:
tag: steps.current_version.version
- name: Archive production artifacts
if: steps.check_tag.outputs.exists == 'false'
uses: actions/upload-artifact@v4
with:
name: bin
path: ./apps/cli/zig-out/*
# - uses: 'marvinpinto/action-automatic-releases@latest'
# if: steps.check_tag.outputs.exists == 'false'
# with:
# repo_token: '${{ secrets.GITHUB_TOKEN }}'
# automatic_release_tag: steps.current_version.version
# prerelease: false
# files: ./apps/cli/zig-out/*