feature/1220 origin handle exists method (#1243)

* feat: add docs and CI workflow for publishing to onsonr.dev

* (refactor): Move hway,motr executables to their own repos

* feat: simplify devnet and testnet configurations

* refactor: update import path for didcrypto package

* docs(networks): Add README with project overview, architecture, and community links

* refactor: Move network configurations to deploy directory

* build: update golang version to 1.23

* refactor: move logger interface to appropriate package

* refactor: Move devnet configuration to networks/devnet

* chore: improve release process with date variable

* (chore): Move Crypto Library

* refactor: improve code structure and readability in DID module

* feat: integrate Trunk CI checks

* ci: optimize CI workflow by removing redundant build jobs

* feat: integrate Trunk CI checks, simplify devnet and testnet configurations, add docs and CI for onsonr.dev publishing, automate releases using Taskfile and GitHub Actions, and add Reddit release notification

* ci: Trigger release validation on pull requests

* ci: Migrate GoReleaser configuration to Makefiles

* chore: update CI workflow permissions and rename job

* refactor: remove unnecessary docker push steps from release process

* feat: automate release process using Taskfile and GitHub Actions

* fix: change shebang from bash to sh

* chore: update setup script shebang to bash

* chore: remove unnecessary setup-env step from release process

* test: improve test descriptions and naming for clarity

* refactor: rename workflow files for clarity

* refactor: rename post-merge workflow file

* refactor: Move race and coverage tests to separate workflow

* refactor: simplify merge group trigger

* chore: prevent accidental release overwriting of existing tags

* test: rename GoReleaser Dry Run step to GoReleaser Test

* fix: correct GitHub Actions workflow for version bumping

* fix: Correct tag validation in CI workflow

* refactor: simplify GitHub Actions workflow for version checking

* test: replace version check with make command

* chore: update setup-python action to v5

* test: rename workflow job and remove unnecessary steps

* feat: enable workflow on merge group events

---------

Signed-off-by: Prad Nukala <prad@sonr.io>
Co-authored-by: Darp Alakun <i@prad.nu>
This commit is contained in:
Prad Nukala
2025-01-06 14:00:11 -05:00
committed by GitHub
co-authored by root
parent 2f65b1c283
commit 7f3aa01bd5
10 changed files with 154 additions and 115 deletions
@@ -1,4 +1,4 @@
name: Perform Checks on PR
name: Check PR
on:
pull_request:
@@ -10,7 +10,7 @@ permissions:
jobs:
verify-pr:
name: Verify PR
name: Test Lints
if: github.event_name == 'pull_request'
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
@@ -31,7 +31,7 @@ jobs:
test-builds:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Run Build Tests
name: Test Builds
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -50,7 +50,7 @@ jobs:
test-unit:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Run Unit Tests
name: Test Unit
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -65,47 +65,10 @@ jobs:
check-latest: true
- run: make test-unit
test-race:
runs-on: ubuntu-latest
if: github.event_name == 'merge_group'
name: Run Race Tests
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- run: make test-race
test-cover:
runs-on: ubuntu-latest
if: github.event_name == 'merge_group'
name: Run Coverage Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- run: make test-cover
validate-release:
if: github.event_name == 'merge_group' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Verify Release Config
name: Test Version
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -119,20 +82,17 @@ jobs:
go-version: "1.23"
check-latest: true
- name: Commitizen Dry Run
uses: commitizen-tools/commitizen-action@master
- name: Install Python
uses: actions/setup-python@v5
with:
push: false
dry_run: true
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
python-version: "3.x"
- name: Version Check
run: make validate-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check GoReleaser Config
run: make release-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: GoReleaser Dry Run
run: make release-dry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+68
View File
@@ -0,0 +1,68 @@
name: Merge Group
on:
merge_group:
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
jobs:
test-race:
runs-on: ubuntu-latest
if: github.event_name == 'merge_group'
name: Test Race
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- run: make test-race
test-cover:
runs-on: ubuntu-latest
if: github.event_name == 'merge_group'
name: Test Coverage
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- run: make test-cover
test-release:
runs-on: ubuntu-latest
name: Test Release
if: github.event_name == 'merge_group'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- name: Release Dry Run
run: make release-dry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
name: Bump Version on Merge
name: Post Merge
on:
pull_request:
types: [closed]
@@ -9,6 +9,7 @@ permissions:
jobs:
bump-version:
name: Cz Bump
if: |
github.event.pull_request.merged == true &&
github.event.pull_request.user.login != 'dependabot[bot]' &&
@@ -26,6 +27,7 @@ jobs:
with:
push: false
increment: patch
branch: main
- name: Push using ssh
run: |
@@ -1,4 +1,4 @@
name: Publish Assets on Release
name: New Release
on:
release:
types: [published]
@@ -9,7 +9,7 @@ permissions:
jobs:
buf_push:
name: Publish to buf.build/onsonr/sonr
name: Publish Protobufs
runs-on: ubuntu-latest
steps:
# Run `git checkout`
@@ -24,7 +24,7 @@ jobs:
buf_token: ${{ secrets.BUF_TOKEN }}
container-push:
name: Publish Container Images
name: Publish Docker Images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
docs-push:
runs-on: ubuntu-latest
name: Publish Docs to onsonr.dev
name: Publish Tech Docs
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
@@ -1,4 +1,4 @@
name: Versioned Release
name: New Tag
on:
pull_request:
@@ -14,7 +14,7 @@ permissions:
jobs:
new-release:
name: Run GoReleaser on New Tag
name: Create Release
if: startsWith(github.ref, 'refs/tags/')
permissions: write-all
runs-on: ubuntu-latest