Files
jj-cz/.github/workflows/release.yml
Lucien Cartier-Tilet 2d3ef90c62
Some checks failed
Release / checks (push) Successful in 20m46s
Publish Docker Images / coverage-and-sonar (push) Successful in 29m21s
Release / release (push) Failing after 30m57s
chore(release): prepare 1.0.0 release
2026-03-25 08:29:06 +01:00

87 lines
2.6 KiB
YAML

name: Release
on:
push:
branches:
- main
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run Checks
run: nix develop --no-pure-eval --command just check-all
release:
needs: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CI_TOKEN }}
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Check for releasable commits
id: releasable
run: |
COUNT=$(nix develop --no-pure-eval --command just cliff-count)
echo "count=$COUNT" >> $GITHUB_OUTPUT
- name: Determine next version
if: steps.releasable.outputs.count > 0
id: next_version
run: |
CLIFF_NEXT_VERSION=$(nix develop --no-pure-eval --command just cliff-next-version)
echo "version=$CLIFF_NEXT_VERSION" >> $GITHUB_OUTPUT
- name: Update changelog
if: steps.releasable.outputs.count > 0
run: nix develop --no-pure-eval --command just cliff-bump
- name: Create release commit
if: steps.releasable.outputs.count > 0
run: |
VERSION=${{ steps.next_version.outputs.version }}
nix develop --no-pure-eval --command just commit-release "$VERSION"
- name: Create version tag
if: steps.releasable.outputs.count > 0
run: |
VERSION=${{ steps.next_version.outputs.version }}
nix develop --no-pure-eval --command just create-release-tag "$VERSION"
- name: Build Linux release binaries
if: steps.releasable.outputs.count > 0
run: nix build
- name: Build Windows release binaries
if: steps.releasable.outputs.count > 0
run: nix build .#windows
- name: Publish on crates.io
if: steps.releasable.outputs.count > 0
run: nix develop --no-pure-eval --accept-flake-config --command cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Rebase develop onto main
if: steps.releasable.outputs.count > 0
run: nix develop --no-pure-eval --command just rebase-develop
- name: Bump to next dev version
if: steps.releasable.outputs.count > 0
run: |
VERSION=${{ steps.next_version.outputs.version }}
nix develop --no-pure-eval --command just update-develop-version "$VERSION"