chore(release): prepare 1.0.0 release
This commit is contained in:
22
.github/workflows/action.yml
vendored
22
.github/workflows/action.yml
vendored
@@ -28,21 +28,27 @@ jobs:
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
|
||||
- name: Set up cachix
|
||||
uses: cachix/cachix-action@v17
|
||||
with:
|
||||
name: phundrak
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Format Check
|
||||
run: |
|
||||
nix develop --no-pure-eval --accept-flake-config --command just format-check
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just format-check
|
||||
|
||||
- name: Audit
|
||||
run: |
|
||||
nix develop --no-pure-eval --accept-flake-config --command just audit
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just audit
|
||||
|
||||
- name: Coverage
|
||||
run: |
|
||||
nix develop --no-pure-eval --accept-flake-config --command just coverage-ci
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just coverage-ci
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
nix develop --no-pure-eval --accept-flake-config --command just lint-report
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just lint-report
|
||||
|
||||
- name: Sonar analysis
|
||||
uses: SonarSource/sonarqube-scan-action@v6
|
||||
|
||||
106
.github/workflows/release.yml
vendored
Normal file
106
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
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: Set up cachix
|
||||
uses: cachix/cachix-action@v17
|
||||
with:
|
||||
name: phundrak
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Run Checks
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: 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: Set up cachix
|
||||
uses: cachix/cachix-action@v17
|
||||
with:
|
||||
name: phundrak
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- 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
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just cliff-bump
|
||||
|
||||
- name: Create release commit
|
||||
if: steps.releasable.outputs.count > 0
|
||||
env:
|
||||
VERSION: ${{ steps.next_version.outputs.version }}
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just commit-release $VERSION
|
||||
|
||||
- name: Create version tag
|
||||
if: steps.releasable.outputs.count > 0
|
||||
env:
|
||||
VERSION: ${{ steps.next_version.outputs.version }}
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: 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
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: cargo publish
|
||||
|
||||
- name: Rebase develop onto main
|
||||
if: steps.releasable.outputs.count > 0
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just rebase-develop
|
||||
|
||||
- name: Bump to next dev version
|
||||
if: steps.releasable.outputs.count > 0
|
||||
env:
|
||||
VERSION: ${{ steps.next_version.outputs.version }}
|
||||
shell: bash -c "nix develop --no-pure-eval --accept-flake-config --command {0}"
|
||||
run: just update-develop-version $VERSION
|
||||
Reference in New Issue
Block a user