Skip to content

Commit a1333e0

Browse files
authored
Merge branch 'master' into rbarker-dev-patch-1
2 parents 650fb62 + 6f880ae commit a1333e0

33 files changed

+424
-209
lines changed

.github/SECURITY.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
We currently support the following versions with security updates:
5+
6+
| Version | Supported |
7+
|---------|--------------------|
8+
| latest | :white_check_mark: |
9+
10+
## Reporting a Vulnerability
11+
If you discover a security vulnerability, please report it privately by emailing [[email protected]](mailto:[email protected]).
12+
Do not create a public issue to disclose the vulnerability.
13+
14+
We will acknowledge receipt of your report within 48 hours and work on a fix as soon as possible.
15+
16+
## Security Best Practices
17+
- Follow [GitHub's security best practices](https://docs.github.com/en/code-security).
18+
- Ensure dependencies are up to date.
19+
- Use GitHub Dependabot to monitor vulnerabilities.

.github/workflows/main.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Release
2+
on:
3+
workflow_run:
4+
workflows: ["Tests"]
5+
branches: ["master", "main"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
version:
14+
name: Gather version information
15+
runs-on: ubuntu-latest
16+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
17+
18+
outputs:
19+
latest_version: ${{ steps.latest_version.outputs.version }}
20+
next_version: ${{ steps.next_version.outputs.version }}
21+
22+
steps:
23+
- name: Checkout Code
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
fetch-depth: 0
27+
ref: ${{ github.ref }}
28+
29+
- name: Setup git-semver
30+
uses: PandasWhoCode/setup-git-semver@b6b17c8e4e6b307d2a66fd93797a9d30e48836e1 # v1.0.4
31+
with:
32+
version: latest
33+
34+
- name: Latest version
35+
id: latest_version
36+
run: echo "version=$(git-semver --latest-version)" >> "${GITHUB_OUTPUT}"
37+
38+
- name: Next version
39+
id: next_version
40+
run: echo "version=$(git-semver --next-version)" >> "${GITHUB_OUTPUT}"
41+
42+
release:
43+
name: Release
44+
needs: version
45+
if: ${{ needs.version.outputs.latest_version != needs.version.outputs.next_version }}
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout Code
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+
with:
51+
fetch-depth: 0
52+
ref: ${{ github.ref }}
53+
54+
- name: Setup git-semver
55+
uses: PandasWhoCode/setup-git-semver@b6b17c8e4e6b307d2a66fd93797a9d30e48836e1 # v1.0.4
56+
with:
57+
version: latest
58+
59+
- name: Generate Changelog
60+
id: generate_changelog
61+
env:
62+
VERSION=${{ needs.version.outputs.next_version }}
63+
run: |
64+
changelog=$(git-semver log --markdown "${VERSION}")
65+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
66+
67+
- name: Create Release
68+
id: create_release
69+
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
tag_name: v${{ needs.version.outputs.next_version }}
74+
release_name: Release ${{ needs.version.outputs.next_version }}
75+
body: |
76+
${{ steps.generate_changelog.outputs.changelog }}
77+
draft: false # Tag must be published before gitreleaser is executed
78+
prerelease: false

.github/workflows/tests.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- "master"
8+
- "main"
9+
pull_request:
10+
branches:
11+
- "master"
12+
- "main"
13+
14+
jobs:
15+
unit_tests:
16+
name: Unit Tests
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
with:
22+
ref: ${{ github.ref }}
23+
24+
- name: Setup Go
25+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
26+
with:
27+
go-version: '^1.24.1'
28+
- run: go test ./...
29+
30+
integration_tests:
31+
name: Integration Tests
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout Code
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
ref: ${{ github.ref }}
38+
39+
- name: Setup Java
40+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
41+
with:
42+
java-version: '21'
43+
distribution: 'temurin'
44+
cache: 'maven'
45+
46+
- name: Run Tests
47+
run: cd integration_tests && mvn verify
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: PR Conventional Commit Validation
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
issues: write
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
validate-pr-title:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: PR Conventional Commit Validation
20+
uses: ytanikin/pr-conventional-commits@8267db1bacc237419f9ed0228bb9d94e94271a1d # v1.4.1
21+
with:
22+
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'

.goreleaser.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1+
version: 2
12
project_name: git-semver
2-
before:
3-
hooks:
4-
# You may remove this if you don't use go modules.
5-
- go mod tidy
6-
# you may remove this if you don't need go generate
7-
- go generate ./...
83
builds:
94
- main: ./cli/main.go
105
goos:
@@ -19,17 +14,8 @@ builds:
1914
ignore:
2015
- goos: windows
2116
goarch: arm64
22-
checksum:
23-
name_template: 'checksums.txt'
2417
snapshot:
2518
name_template: "{{ incpatch .Version }}-next"
26-
changelog:
27-
skip: true
28-
release:
29-
github:
30-
owner: PSanetra
31-
name: git-semver
32-
mode: keep-existing
3319
dockers:
3420
- image_templates:
3521
- "psanetra/git-semver:latest"
@@ -41,7 +27,15 @@ dockers:
4127
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
4228
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
4329
- "--label=org.opencontainers.image.version={{ .Version }}"
44-
30+
checksum:
31+
name_template: 'checksums.txt'
32+
changelog:
33+
disable: true
34+
release:
35+
github:
36+
owner: PSanetra
37+
name: git-semver
38+
mode: keep-existing
4539
# modelines, feel free to remove those if you don't want/use them:
4640
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
4741
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

CODE_OF_CONDUCT.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and maintainers of this project pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, inclusive, and healthy environment.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our project include:
12+
13+
- Using welcoming and inclusive language
14+
- Being respectful of differing viewpoints and experiences
15+
- Gracefully accepting constructive criticism
16+
- Focusing on what is best for the community
17+
- Showing empathy towards other community members
18+
19+
Examples of unacceptable behavior by participants include:
20+
21+
- The use of sexualized language or imagery, and unwelcome sexual attention or advances
22+
- Trolling, insulting/derogatory comments, and personal attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Our Responsibilities
28+
29+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
30+
31+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all project spaces, both physical and online, when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
This Code of Conduct also applies outside project spaces when the individual is representing the project or its community in public spaces.
38+
39+
## Enforcement
40+
41+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [[email protected]]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
42+
43+
## Enforcement Guidelines
44+
45+
Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem to be in violation of this Code of Conduct:
46+
47+
- **Contribution Removal**: Violations of the Code of Conduct may result in a temporary or permanent ban on the ability to contribute to the project.
48+
- **Warning**: The offending participant may be given a warning after the first instance of inappropriate behavior.
49+
- **Temporary Ban**: If the inappropriate behavior continues, the participant may be temporarily banned from participating in the community for a period of time.
50+
- **Permanent Ban**: In extreme cases, an individual may be permanently banned from contributing to the project.
51+
52+
## Attribution
53+
54+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

0 commit comments

Comments
 (0)