-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: write documentation for upcoming v0.8.0 release (#139)
- Loading branch information
1 parent
cd458ab
commit ae6dde1
Showing
25 changed files
with
368 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
|
||
jobs: | ||
nsv: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- | ||
icon: material/sword | ||
social: | ||
cards: false | ||
status: new | ||
--- | ||
|
||
# Using Dagger in your CI | ||
|
||
<span class="rounded-pill">:material-test-tube: experimental</span> | ||
|
||
## GitHub Action | ||
|
||
Run [nsv](https://daggerverse.dev/mod/github.com/purpleclay/daggerverse/nsv) using the official Dagger [GitHub Action](https://github.com/dagger/dagger-for-github). The Dagger Cloud offers enhanced layer caching, which can be enabled by setting a `DAGGER_CLOUD_TOKEN` environment variable. | ||
|
||
```{.yaml .no-select linenums="1"} | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
nsv: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_NSV }} # (1)! | ||
- name: Tag | ||
uses: dagger/dagger-for-github@v5 | ||
env: | ||
GPG_PRIVATE_KEY: "${{ secrets.GPG_PRIVATE_KEY }}" | ||
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}" | ||
with: | ||
verb: call | ||
module: github.com/purpleclay/daggerverse/nsv | ||
args: --src . tag --show --gpg-private-key env:GPG_PRIVATE_KEY --gpg-passphrase env:GPG_PASSPHRASE | ||
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | ||
``` | ||
|
||
1. A PAT token triggers another workflow after tagging the repository; this is optional. | ||
|
||
## GitLab Template | ||
|
||
The same Dagger experience is possible within GitLab using the Purple Clay [template](https://gitlab.com/purpleclay/templates/-/blob/main/dagger/README.md?ref_type=heads). The Dagger Cloud offers enhanced layer caching, which can be enabled by setting a `DAGGER_CLOUD_TOKEN` environment variable. | ||
|
||
```{.yaml .no-select linenums="1" hl_lines="28-29"} | ||
include: | ||
- "https://gitlab.com/purpleclay/templates/-/raw/dagger/0.11.6/dagger/Mixed.gitlab-ci.yml" | ||
nsv: | ||
extends: [.dagger] | ||
stage: release | ||
rules: | ||
- if: $CI_COMMIT_TAG | ||
when: never | ||
- if: $CI_PIPELINE_SOURCE == "schedule" | ||
when: never | ||
- if: $CI_MERGE_REQUEST_IID | ||
when: never | ||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
when: on_success | ||
variables: | ||
GIT_DEPTH: 0 | ||
GIT_STRATEGY: clone | ||
DAGGER_MODULE: "github.com/purpleclay/daggerverse/nsv" | ||
DAGGER_ARGS: >- | ||
--src . | ||
tag | ||
--show | ||
--paths ${WORKING_DIRECTORY} | ||
--gpg-private-key env:NSV_GPG_PRIVATE_KEY | ||
--gpg-passphrase env:NSV_GPG_PASSPHRASE | ||
before_script: # (1)! | ||
- PROJECT_URL=${CI_PROJECT_URL#"https://"} | ||
- git remote set-url origin "https://oauth2:${NSV_GITLAB_TOKEN}@${PROJECT_URL}.git" | ||
``` | ||
|
||
1. To push a newly created tag, an access token with `:write_repository` permissions is required. Here, it is assigned to the `NSV_GITLAB_TOKEN` CI variable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
icon: material/apple-keyboard-command | ||
description: Advanced control of semantic versioning through dedicated commands | ||
status: new | ||
--- | ||
|
||
# Configure your Conventional prefixes | ||
|
||
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) offers a fantastic approach to controlling semantic versioning through commit prefixes. An industry standard convention devised by the Angular team is most commonly used to date. | ||
|
||
- `BREAKING CHANGE`: any commit with this footer triggers a major update. | ||
- `!`: any conventional prefix with this suffix (e.g. `refactor!`) triggers a major update. | ||
- `feat`: triggers a minor update. | ||
- `fix`: triggers a patch update. | ||
|
||
## Defining your own rules | ||
|
||
- `breaking`: triggers a major update `1.0.0` ~> `2.0.0`. | ||
- `feat`, `deps`: triggers a minor update `0.1.0` ~> `0.2.0`. | ||
- `fix`, `docs`, `styles`: triggers a patch update `0.3.1` ~> `0.3.2`. | ||
|
||
=== "ENV" | ||
|
||
```{ .sh .no-select } | ||
NSV_MAJOR_PREFIXES=breaking \ | ||
NSV_MINOR_PREFIXES=feat,deps \ | ||
NSV_PATCH_PREFIXES=fix,docs,styles \ | ||
nsv next | ||
``` | ||
|
||
=== "CLI" | ||
|
||
```{ .sh .no-select } | ||
nsv next --major-prefixes breaking \ | ||
--minor-prefixes feat,deps \ | ||
--patch-prefixes fix,docs,styles | ||
``` | ||
|
||
Don't worry—when defining your custom prefixes, both the `BREAKING CHANGE` footer and the `!` suffix are automatically supported. | ||
|
||
## How prefix matching works | ||
|
||
`nsv` matches a prefix in one of two ways: | ||
|
||
- `breaking` is a <u>wildcard</u> prefix capable of matching against an optional scope. | ||
- `breaking(api)` is an <u>exact</u> match only. |
Oops, something went wrong.