···11+# release-plz configuration
22+# https://release-plz.dev/docs/config
33+44+[workspace]
55+# Tags like vX.Y.Z
66+git_tag_name = "v{{ version }}"
77+88+# Customize the pull request
99+pr_name = "chore: release v{{ version }}"
1010+pr_body = """
1111+{% for release in releases -%}
1212+## Release v{{ release.next_version }}
1313+1414+This PR prepares the next release. The changelog has been automatically generated from commit messages.
1515+1616+**Before merging:**
1717+- Review the version bump ({{ release.previous_version }} → {{ release.next_version }})
1818+- Review semver compatibility: {{ release.semver_check }}
1919+- Edit `CHANGELOG.md` to add any custom commentary, context, or highlights
2020+- Ensure all changes are documented appropriately
2121+2222+After merging, the package will be automatically published to crates.io and a GitHub release will be created with tag `v{{ release.next_version }}`.
2323+{% endfor -%}
2424+"""
2525+2626+# Add labels to release PRs for easier filtering
2727+pr_labels = ["release"]
2828+2929+# Customize GitHub release
3030+git_release_type = "auto"
3131+git_release_body = """
3232+{{ changelog }}
3333+3434+---
3535+**Installation:**
3636+```bash
3737+cargo install cmprss@{{ version }}
3838+```
3939+4040+**Repository:** https://github.com/arcuru/cmprss
4141+"""
+86
.github/workflows/publish.yml
···11+# Publish workflow — builds snap package and publishes to the Snap Store.
22+#
33+# Triggers:
44+# 1. workflow_run: After Nix CI passes on main. Builds the snap to validate
55+# the packaging pipeline on every push to main.
66+#
77+# 2. release (published): After release-plz creates a GitHub release and tag.
88+# Builds the snap with the release version and publishes to the Snap Store.
99+#
1010+# 3. workflow_dispatch: Manual retry for a failed release. Accepts a tag name
1111+# input and publishes the snap for that tag.
1212+#
1313+# On release day, both triggers 1 and 2 fire independently — the workflow_run
1414+# from the merge to main, and the release event from release-plz tagging. This
1515+# is intentional: the dev run validates the pipeline, and the release run
1616+# publishes the versioned snap.
1717+1818+name: Publish
1919+2020+on:
2121+ workflow_run:
2222+ workflows: ["Nix"]
2323+ types: [completed]
2424+ branches: ["main"]
2525+ release:
2626+ types: [published]
2727+ workflow_dispatch:
2828+ inputs:
2929+ tag_name:
3030+ description: "Release tag to retry (e.g. v1.2.3)"
3131+ required: true
3232+ type: string
3333+3434+jobs:
3535+ snap:
3636+ name: Snap
3737+ runs-on: ubuntu-latest
3838+ if: |
3939+ github.repository_owner == 'arcuru' &&
4040+ (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')
4141+ environment: ${{ (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && 'publish' || '' }}
4242+ steps:
4343+ - name: Resolve ref
4444+ id: ref
4545+ env:
4646+ EVENT_NAME: ${{ github.event_name }}
4747+ RELEASE_TAG: ${{ github.event.release.tag_name }}
4848+ INPUT_TAG: ${{ inputs.tag_name }}
4949+ RUN_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
5050+ run: |
5151+ if [[ "$EVENT_NAME" == "release" ]]; then
5252+ echo "ref=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
5353+ elif [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
5454+ echo "ref=$INPUT_TAG" >> "$GITHUB_OUTPUT"
5555+ else
5656+ echo "ref=$RUN_SHA" >> "$GITHUB_OUTPUT"
5757+ fi
5858+5959+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6060+ with:
6161+ ref: ${{ steps.ref.outputs.ref }}
6262+6363+ - name: Set snap version from release tag
6464+ if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
6565+ env:
6666+ TAG: ${{ github.event.release.tag_name || inputs.tag_name }}
6767+ run: |
6868+ VERSION="${TAG#v}"
6969+ sed -i "s/^version: .*/version: \"${VERSION}\"/" snap/snapcraft.yaml
7070+7171+ - uses: snapcore/action-build@d12445ae70c52b1ead8b8a0ac6635f0432af5c80 # v1.3.0
7272+ id: build
7373+7474+ - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
7575+ with:
7676+ name: snap
7777+ path: ${{ steps.build.outputs.snap }}
7878+7979+ - name: Publish to Snap Store
8080+ if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
8181+ uses: snapcore/action-publish@214b86e5ca036ead1668c79571f947af2ee6e1d3 # v1.2.0
8282+ env:
8383+ SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
8484+ with:
8585+ snap: ${{ steps.build.outputs.snap }}
8686+ release: stable
···11-# git-cliff ~ default configuration file
22-# https://git-cliff.org/docs/configuration
33-#
44-# Lines starting with "#" are comments.
55-# Configuration options are organized into tables and keys.
66-# See documentation for more information on available options.
77-88-[changelog]
99-# changelog header
1010-header = """
1111-# Changelog\n
1212-All notable changes to this project will be documented in this file.\n
1313-"""
1414-# template for the changelog body
1515-# https://keats.github.io/tera/docs/#introduction
1616-body = """
1717-{% if version %}\
1818- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
1919-{% else %}\
2020- ## [unreleased]
2121-{% endif %}\
2222-{% for group, commits in commits | group_by(attribute="group") %}
2323- ### {{ group | upper_first }}
2424- {% for commit in commits %}
2525- - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
2626- {% endfor %}
2727-{% endfor %}\n
2828-"""
2929-# remove the leading and trailing whitespace from the template
3030-trim = true
3131-# changelog footer
3232-footer = """
3333-<!-- generated by git-cliff -->
3434-"""
3535-# postprocessors
3636-postprocessors = [
3737- # { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
3838-]
3939-[git]
4040-# parse the commits based on https://www.conventionalcommits.org
4141-conventional_commits = true
4242-# filter out the commits that are not conventional
4343-filter_unconventional = true
4444-# process each line of a commit as an individual commit
4545-split_commits = false
4646-# regex for preprocessing the commit messages
4747-commit_preprocessors = [
4848- # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, # replace issue numbers
4949-]
5050-# regex for parsing and grouping commits
5151-commit_parsers = [
5252- { message = "^feat", group = "Features" },
5353- { message = "^fix", group = "Bug Fixes" },
5454- { message = "^doc", group = "Documentation" },
5555- { message = "^perf", group = "Performance" },
5656- { message = "^refactor", group = "Refactor" },
5757- { message = "^style", group = "Styling" },
5858- { message = "^test", group = "Testing" },
5959- { message = "^chore\\(release\\): prepare for", skip = true },
6060- { message = "^chore\\(deps\\)", skip = true },
6161- { message = "^chore\\(pr\\)", skip = true },
6262- { message = "^chore\\(pull\\)", skip = true },
6363- { message = "^chore|ci", group = "Miscellaneous Tasks" },
6464- { body = ".*security", group = "Security" },
6565- { message = "^revert", group = "Revert" },
6666-]
6767-# protect breaking changes from being skipped due to matching a skipping commit_parser
6868-protect_breaking_commits = false
6969-# filter out the commits that are not matched by commit parsers
7070-filter_commits = false
7171-# regex for matching git tags
7272-tag_pattern = "v[0-9].*"
7373-7474-# regex for skipping tags
7575-skip_tags = "v0.1.0-beta.1"
7676-# regex for ignoring tags
7777-ignore_tags = ""
7878-# sort the tags topologically
7979-topo_order = false
8080-# sort the commits inside sections by oldest/newest order
8181-sort_commits = "oldest"
8282-# limit the number of commits included in the changelog.
8383-# limit_commits = 42
+1-1
snap/snapcraft.yaml
···11name: cmprss
22-version: "0.2.0"
22+version: git
33summary: A compression multi-tool for the command line
44description: |
55 Replace tar with something you can remember.