Skip to content

Add CD workflow

Add CD workflow #6

Workflow file for this run

name: CD Release Pipeline
concurrency:
group: cd-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: ["add-cd"]
tags:
- "*/*"
jobs:
extract-version:
runs-on: ubuntu-latest
outputs:
target: ${{ steps.extract.outputs.target }}
major: ${{ steps.extract.outputs.major }}
minor: ${{ steps.extract.outputs.minor }}
patch: ${{ steps.extract.outputs.patch }}
steps:
- name: Set $USER if needed
run: |
if [ -z "$USER" ]; then
echo "USER=runner" >> "$GITHUB_ENV"
fi
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-23.11
- uses: cachix/cachix-action@v14
with:
name: apibara-public
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- id: extract
run: nix develop .#ci -c extract-version-from-tag
release:
name: "Build artifacts sink-mongo"
uses: ./.github/workflows/cd-build.yml
if: startsWith(github.ref, 'refs/tags/sink-mongo/v')
with:
target: sink-mongo
secrets:
cachix-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"